Skip to content

Commit

Permalink
完善config
Browse files Browse the repository at this point in the history
2024.7.21
  • Loading branch information
crack-dawn committed Jul 21, 2024
1 parent cce9663 commit 5e4d391
Show file tree
Hide file tree
Showing 95 changed files with 8,253 additions and 4,014 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: Deploy Hugo site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -37,14 +36,13 @@ jobs:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand All @@ -54,12 +52,10 @@ jobs:
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
TZ: America/Los_Angeles
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"svg.preview.background": "dark-transparent"
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,8 @@ git push -u origin master
4. 慢慢了解hugo的功能框架,本身也是接触硬件多,网站运维知识并不了解;但是hugo的博客搭建,我感觉挺轻快有趣的。
5. 还没摸清楚 `github action``github pages`以及`workflow`的使用技巧。

hugo mod init github.com/crack-dawn/CTGU-Student-Hugo-Blog
[email protected]:crack-dawn/CTGU-Student-Hugo-Blog.git

6. 建立好项目后,可以尝试修改设置文件,[FixIt主题设置说明](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/configuration/)

<!-- hugo mod init github.com/crack-dawn/CTGU-Student-Hugo-Blog
[email protected]:crack-dawn/CTGU-Student-Hugo-Blog.git -->
40 changes: 39 additions & 1 deletion archetypes/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,45 @@ title: {{ replace .TranslationBaseName "-" " " | title }}
subtitle:
date: {{ .Date }}
slug: {{ substr .File.UniqueID 0 7 }}
draft: false
comment: false
summary:
description:
keywords:
draft: true
password:

archives:
tags: ['draft']
categories: ['draft']

weight: 0
message:
repost:
enable: true
url:

author:
name:
link:
email:
avatar:
license:
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false

resources:
- name: featured-image
src: featured-image.jpg
- name: featured-image-preview
src: featured-image-preview.jpg
toc: true
math: true
lightgallery: true


# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---

<!--more-->
37 changes: 0 additions & 37 deletions archetypes/friends.md

This file was deleted.

41 changes: 29 additions & 12 deletions archetypes/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,44 @@ subtitle:
date: {{ .Date }}
slug: {{ substr .File.UniqueID 0 7 }}
draft: false
author:
name:
link:
email:
avatar:
description:
comment: false
summary:
description:
keywords:
license:
comment: true
password:

archives:
tags: ['draft']
categories: ['draft']
toc: true
math: false
lightgallery: false

weight: 0
message:
repost:
enable: true
url:

author:
name:
link:
email:
avatar:
license:
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false

resources:
- name: featured-image
src: featured-image.jpg
- name: featured-image-preview
src: featured-image-preview.jpg
toc: true
math: true
lightgallery: true


# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---

<!--more-->
<!--more-->
File renamed without changes
File renamed without changes.
12 changes: 12 additions & 0 deletions assets/my/hugo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/my/首页.mp4
Binary file not shown.
9 changes: 9 additions & 0 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# title = "A CTGUer's Hugo Static Site" # 网站主标题
baseURL = 'https://crack-dawn.github.io/CTGU-Hugo-Blog.io'# 网站根目录
languageCode = 'en-us'
defaultContentLanguage = "zh-cn" # 默认语言
theme = ["hugo-embed-pdf-shortcode", "FixIt"]
enableInlineShortcodes = true



61 changes: 61 additions & 0 deletions config/_default/menu.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 中文菜单配置
[[main]]
identifier = "posts"
# 父级菜单项的标识符 (identifier) since v0.2.14
parent = ""
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = "<i class='fa-solid fa-archive fa-fw fa-sm'></i>"
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
name = "所有文章"
url = "/posts/"
title = ""
weight = 1
[[main]]
identifier = "categories"
pre = "<i class='fa-solid fa-th fa-fw fa-sm'></i>"
post = ""
name = "分类"
url = "/categories/"
title = ""
weight = 2
[[main]]
identifier = "tags"
pre = "<i class='fa-solid fa-tags fa-fw fa-sm'></i>"
post = ""
name = "标签"
url = "/tags/"
title = ""
weight = 3
[[main]]
identifier = "friends"
pre = "<i class='fa-solid fa-users fa-fw fa-sm'></i>"
post = ""
name = "友链"
url = "/friends/"
title = "友情链接"
weight = 4
[[main]]
identifier = "rss"
pre = "<i class='fa-solid fa-rss'></i>"
post = ""
name = "专栏"
url = "/course/"
title = ""
weight = 5
[[main]]
identifier = "about"
pre = "<i class='fa-solid fa-info-circle fa-fw fa-sm'></i>"
post = ""
name = "关于"
url = "/about/"
title = ""
weight = 6
[[main]]
identifier = "github"
pre = "<i class='fa-brands fa-github fa-fw'></i>"
post = ""
name = "仓库"
url = "https://github.com/crack-dawn/CTGU-Hugo-Blog.io"
title = "GitHub"
weight = 7
Loading

0 comments on commit 5e4d391

Please sign in to comment.