Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewens committed Nov 17, 2024
1 parent e6d33a2 commit be1d4a5
Show file tree
Hide file tree
Showing 14 changed files with 1,009 additions and 0 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Deploy lawbda-pages to Pages

on:
push:
paths-ignore:
- "images/**"
- "LICENSE"
- "README.md"
branches:
- main
- exampleSite
workflow_dispatch:
# manual run
# inputs:
# hugoVersion:
# description: "Hugo Version"
# required: false
# default: "0.115.4"

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

# Default to bash
defaults:
run:
shell: bash

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
# Build job
build-lawbda:
runs-on: ubuntu-latest
# env:
# HUGO_VERSION: "0.115.4"
steps:
# 停止checkout submodule 在后面再更新
# 此处只对本项目checkout
- name: Checkout
uses: actions/checkout@v3
with:
# token: ${{ secrets.SECRET_REPO_DEPLOY_KEY }}
# ssh-key: ${{ secrets.SECRET_REPO_DEPLOY_KEY }}
submodules: false
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- name: Generated Cache
uses: actions/cache@v3
with:
path: resources/_gen
key: ${{ runner.os }}-generated-${{ hashFiles('**') }}
restore-keys: ${{ runner.os }}-generated
- name: Update Theme
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.SECRET_REPO_DEPLOY_KEY }}'
git submodule update --init --recursive
git submodule update --remote --merge
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v2
with:
path: ./public
# Deployment job
deploy-lawbda:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-lawbda
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/paperMod"]
path = themes/paperMod
url = git@github.com:Sewens/hugo-PaperMod.git
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# initial chroma theme, including light and dark
chroma-css:
hugo gen chromastyles --style=xcode-dark > assets/css/lib/chroma-dark.css
hugo gen chromastyles --style=perldoc > assets/css/lib/chroma-light.css
31 changes: 31 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
author: ["Sewens"]
keywords:
-
categories: # 没有分类界面可以不填写
-
tags: # 标签
-
description: ""
weight:
draft: false # 是否为草稿
comments: true # 本页面是否显示评论
math: true # 是否开启KaTex渲染页面公式
mermaid: true #是否开启mermaid
showToc: true # 显示目录
TocOpen: false # 自动展开目录
hidemeta: false # 是否隐藏文章的元信息,如发布日期、作者等
disableShare: true # 底部不显示分享栏
showbreadcrumbs: true #顶部显示路径
cover:
image: "" #图片路径例如:posts/tech/123/123.png
zoom: # 图片大小,例如填写 50% 表示原图像的一半大小
caption: "" #图片底部描述
alt: ""
relative: false
---

216 changes: 216 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
baseURL: "https://pages.lawbda.info/"
languageCode: zh
title: Trans'action on Living Pride
theme: paperMod

# 本站配置
enableInlineShortcodes: true
enableEmoji: true # 允许使用 Emoji 表情,建议 true
enableRobotsTXT: true # 允许爬虫抓取到搜索引擎,建议 true
buildDrafts: false
buildFuture: false
buildExpired: false
hasCJKLanguage: true # 自动检测是否包含 中文日文韩文 如果文章中使用了很多中文引号的话可以开启
paginate: 15 # 每页显示的文章数
defaultContentLanguage: zh # 最顶部首先展示的语言页面
defaultContentLanguageInSubdir: false
summaryLength: 140 # 文章概览的自字数,默认70

# googleAnalytics: UA-123-45

minify:
disableXML: true
# minifyOutput: true

permalinks: #浏览器链接显示方式
# post: "/:slug/"
# essays: /:section/:year/:month/:slug
post: "/:year/:month/:day/:title/"

languages:
zh:
languageName: "Chinese"
# contentDir: content/english #必要时配置
weight: 1
params:
homeInfoParams:
Title: "Trans-on-Living-Pride"
Content: "Living long and prosper"
menu:
main:
# - identifier: search
# name: 🔍搜索
# url: search
# weight: 1
- identifier: home
name: 🏠主页
url: /
weight: 1
- identifier: posts
name: 📚文章
url: posts/
weight: 2
- identifier: trans
name: 🍥译文
url: trans/
weight: 3
# - identifier: tags
# name: 🔖标签
# url: tags
# weight: 40
- identifier: about
name: 🙋🏻‍♂️关于
url: about
weight: 50
# - identifier: links
# name: 🤝友链
# url: links
# weight: 60

outputs:
home:
- HTML
- RSS
- JSON

params:
env: production # to enable google analytics, opengraph, twitter-cards and schema.
# description: "这是一个纯粹的博客......"
author: 半生
# author: ["Me", "You"] # multiple authors
defaultTheme: auto # defaultTheme: light or dark
disableThemeToggle: false # 主题切换按钮
DateFormat: "2006-01-02"

# post header settings
ShowShareButtons: false
ShowReadingTime: true
ShowCodeCopyButtons: true
ShowWordCounts: true
ShowPostNavLinks: true
ShowBreadCrumbs: false
ShowCodeCopyButtons: true
ShowLastMod: true #显示文章更新时间

displayFullLangName: true
disableScrollToTop: false # 回到首页按钮
# disableSpecialistPost: true

hideFooter: false # 隐藏页脚
hideMeta: false # 隐藏元信息
VisitCount: true


ShowToc: false # 显示目录
TocOpen: true # 自动展开目录
TocSide: left # 浮动目录位置

disableShare: true # 不显示share按钮
comments: true

assets:
# socialIcons:
# - name: github
# url: "https://github.com/sewens"
# - name: twitter
# url: "img/twitter.png"
# - name: facebook
# url: "https://www.facebook.com/profile.php?id=100027782410997"
# - name: instagram
# url: "img/instagram.png"
# - name: QQ
# url: "img/qq.png"
# - name: WeChat
# url: "img/wechat.png"
# - name: email
# url: "mailto:1931559710@qq.com"
# - name: RSS
# url: "index.xml"

# editPost:
# URL: "https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite/content"
# Text: "Suggest Changes" # edit text
# appendFilePath: true # to append file path to Edit link

# label:
# text: "Sulv's Blog"
# #icon: "img/Q.gif"
# icon: "https://www.sulvblog.cn/Q.gif"
# iconHeight: 35

# analytics: #谷歌分析
# google:
# SiteVerificationTag: "XYZabc"

# assets:
# favicon: "img/Q.gif"
# favicon16x16: "img/Q.gif"
# favicon32x32: "img/Q.gif"
# apple_touch_icon: "Q.gif"
# safari_pinned_tab: "Q.gif"

cover:
hidden: true # hide everywhere but not in structured data
hiddenInList: true # hide on list pages and home
hiddenInSingle: true # hide on single page

fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 1
minMatchCharLength: 0
keys: ["title", "permalink", "summary"]

twikoo:
version: 1.4.11

taxonomies:
category: categories
tag: tags
series: series

markup:
goldmark:
renderer:
unsafe: true # HUGO 默认转义 Markdown 文件中的 HTML 代码,如需开启的话
highlight:
# anchorLineNos: true
codeFences: true
guessSyntax: true
lineNos: true
noClasses: false
style: perldoc
# tabWidth: 4
# codeFences:代码围栏功能,这个功能一般都要设为 true 的,不然很难看,就是干巴巴的-代码文字,没有颜色。
# guessSyntax:猜测语法,这个功能建议设置为 true, 如果你没有设置要显示的语言则会自动匹配。
# hl_Lines:高亮的行号,一般这个不设置,因为每个代码块我们可能希望让高亮的地方不一样。
# lineNoStart:行号从编号几开始,一般从 1 开始。
# lineNos:是否显示行号,我比较喜欢显示,所以我设置的为 true.
# lineNumbersInTable:使用表来格式化行号和代码,而不是 标签。这个属性一般设置为 true.
# noClasses:使用 class 标签,而不是内嵌的内联样式

privacy:
vimeo:
disabled: false
simple: true

twitter:
disabled: false
enableDNT: true
simple: true

instagram:
disabled: false
simple: true

youtube:
disabled: false
privacyEnhanced: true

services:
instagram:
disableInlineCSS: true
twitter:
disableInlineCSS: true
7 changes: 7 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
author: "Sewen"
date: "2023-07-31"
---

# Welcome
欢迎来到半生的小站,休息一下吧。
24 changes: 24 additions & 0 deletions content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
author: "Sewen"
date: "2019-03-05"
hideMeta: true
---

# 关于我
半生,什么都会一点的笨蛋机器猫,正在学习人类的感情。

# 找到我
[Github](https://github.com/Sewens/lawbda-pages)

# 引用我

```tex
@misc{lawbda-pages,
author = {Sewens},
title = {lawbda-pages},
year = {2020},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/Sewens/lawbda-pages}},
}
```
8 changes: 8 additions & 0 deletions content/posts/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
author: "Sewen"
date: "2023-07-31"
---

# 写作

日常写作内容都在这里啦。
Loading

0 comments on commit be1d4a5

Please sign in to comment.