Skip to content

Commit

Permalink
Merge pull request #17 from ohmykreee/migrate-theme-v4
Browse files Browse the repository at this point in the history
Migrate bilberry-hugo-theme to v4
  • Loading branch information
ohmykreee committed Dec 13, 2023
2 parents 7d94f8d + 2aaf966 commit 31a66db
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
# extended: true
extended: true

- name: Build
run: hugo --minify
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
with:
hugo-version: 'latest'
extended: true

- name: Build
run: hugo --minify

run: |
hugo --minify
- name: Upload Build Artifact
if: success()
uses: actions/upload-artifact@v3
Expand All @@ -30,7 +31,7 @@ jobs:
path: public
if-no-files-found: error

- name: Deploy to Cloudflare Pages
- name: Deploy dev page to Cloudflare Pages
if: success()
uses: cloudflare/pages-action@v1.5.0
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ public
rafts
build-res
resources
.hugo_build.lock
.hugo_build.lock
_vendor
12 changes: 9 additions & 3 deletions archetypes/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
excludeFromTopNav: false
# comment out the menu and weight variables
# if you don't want to display this page in the top navigation bar
menu: topnav
weight: 10

# set the link if you want to redirect the user.
# set the link variable if you want to redirect
# to another URL either relative or absolute
link: ""
# set the html target parameter if you want to change default behavior
# set the target variable if you want to change default behavior,
# that is to open this page in a new tab;
# the target will be ignored if the link is empty
target: "_blank"
---
121 changes: 68 additions & 53 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
title = "Kreee's Blog"
baseURL = "https://blog.ohmykreee.top"
theme = "bilberry-hugo-theme"

# Option 1 (recommended): adding the theme as a Hugo module
# theme = "github.com/Lednerb/bilberry-hugo-theme/v4"


# Options 2 and 3: cloning/copying the theme files
theme = "bilberry-hugo-theme/v4"

# Generate the robots.txt file for SEO
enableRobotsTXT = true
Expand All @@ -9,17 +15,15 @@ enableRobotsTXT = true
DefaultContentLanguage = "zh-cn"

# Enable / Disable Google Analytics statistics for your site
# googleAnalytics = "UA-198973792-1"
# googleAnalytics = ""

# Enable / Disable comments on the articles via Disqus.
# disqusShortname = ""

# Enable / Disable open link with a new tab.
[blackfriday]
hrefTargetBlank = true
disqusShortname = ""

[params]
# Custom CSS / JS modules that will be imported by the template.
enableLightDarkTheme = true

# Custom CSS/JS modules that will be imported by the template.
# Files are relative to the static/ directory or a URL.
# Files are imported in the order they appear here, after
# theme.css and theme.js, respectively.
Expand All @@ -29,7 +33,7 @@ DefaultContentLanguage = "zh-cn"
# Description and meta data for the search engines
author = "Kreee"
description = "A Kreee's Blog, powered by GitHub Pages, Hugo and Bilberry Premium Theme for Hugo."
keywords = "kreee,blog,personal,responsive,font awesome,pages,posts,highlight.js,syntax highlighting,hugo"
keywords = "kreee,blog,personal,responsive,search,font awesome,pages,posts,syntax highlighting,shortcuts"

# How many articles should be displayed at once?
paginate = 7
Expand All @@ -42,7 +46,7 @@ DefaultContentLanguage = "zh-cn"
algolia_appId = "BYCFQKEA4W"
algolia_apiKey = "5b8f1a1d7557fc3b1bc0d99efbaa22ce"
algolia_indexName = "kreee-blog"
# Set this option to false if you want to search within all articles in all languages at once
# Set this option to false if you want to search within all articles in all languages at once
algolia_currentLanguageOnly = false

# Enable / Disable comments on the articles via commento
Expand All @@ -62,13 +66,13 @@ DefaultContentLanguage = "zh-cn"
giscusLanguage = "zh-CN"
giscusCrossOrigin = "anonymous"

# Enable / Disable Utterances comments
utterances = false
utterancesJsUrl = "https://utteranc.es/client.js"
utterancesRepository = "ohmykreee/kreee-blog"
utterancesIssueTerm = "og:title"
utterancesLabel = "Comment"
utterancesTheme = "github-light"
# Enable / Disable Utterances comments
utterances = false
utterancesJsUrl = "https://utteranc.es/client.js"
utterancesRepository = "[ENTER REPO HERE]"
utterancesIssueTerm = "pathname"
utterancesLabel = "Comment"
utterancesTheme = "github-light"
utterancesCrossOrigin = "anonymous"

# Media configuration
Expand All @@ -82,7 +86,7 @@ DefaultContentLanguage = "zh-cn"
subtitle = "Code with love ❤ and paws 🐾!"

# if you want to use libravatar or gravatar for the header image
# avatarEmail = "code@lednerb.de"
avatarEmail = ""

# set an path to the image file you want to use | overwrites avatar by email
customImage = "https://avatars.githubusercontent.com/u/76862878"
Expand All @@ -106,10 +110,10 @@ DefaultContentLanguage = "zh-cn"
# Set to true to pin only to the first page, false to all pages
pinOnlyToFirstPage = true

# enable automatic localization of the article's PublishedDate with momentjs
# enable automatic localization of the article's published date using Moment.js
enableMomentJs = true

# customize the date format | only works if momentjs is disabled | only works with English month names
# customize the date format | only works if Moment.js is disabled | only works with English month names
# you can customize it with the options you find here:
# https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference
dateFormat = "2006-01-02"
Expand Down Expand Up @@ -137,22 +141,22 @@ DefaultContentLanguage = "zh-cn"
# social media profile urls for the footer links
showSocialMedia = true

# show an archive link in the footer
showArchive = false

# archive grouping: "2006" by year, "2006-01" by month
archiveDateGrouping = "2006年01月"

# define your links with FontAwesome 5 (only free icons are supported)
# all icons https://fontawesome.com/icons?d=gallery&m=free
# brand icons https://fontawesome.com/icons?d=gallery&s=brands&m=free
socialMediaLinks = [
{ link = "https://github.com/ohmykreee", icon = "fab fa-github", rel = "me" },
{ link = "https://twitter.com/kre_pow3", icon = "fab fa-twitter", rel = "me" },
{ link = "https://space.bilibili.com/361507684", icon = "fas fa-video", rel = "me" },
{ link = "https://www.ohmykreee.top", icon = "fas fa-book", rel = "me" },
{ link = "https://space.bilibili.com/361507684", icon = "fab fa-bilibili", rel = "me" },
{ link = "https://www.ohmykreee.top", icon = "fas fa-globe", rel = "me" },
]

# show an archive link in the footer
showArchive = false

# archive grouping: "2006" by year, "2006-01" by month
archiveDateGrouping = "2006-01"

# credits line configuration
copyrightBy = "by Kreee"
copyrightUseCurrentYear = false # set to true to always display the current year in the copyright
Expand All @@ -163,36 +167,47 @@ DefaultContentLanguage = "zh-cn"


# customize your available languages for your multi-lingual site
# or delete the [Languages] blog to use the theme with only one supported language
#[Languages]
# [Languages.en]
# weight = 1
# [Languages.de]
# weight = 2
# title = "Mein cooler neuer Blog"
# subtitle = "Hallo Welt! Dies ist der epischste Untertitel aller Zeiten."

# don't change anything below
[taxonomies]
author = "author"
tag = "tags"
category = "categories"
series = "series"

[outputs]
home = [ "HTML", "JSON", "RSS" ]
page = [ "HTML" ]
# or delete one of the [Languages.xx] blocks to use the theme with only one supported language
[Languages]
[Languages.zh-cn]
weight = 1
# [Languages.de]
# weight = 2
# title = "Mein cooler neuer Blog"
# subtitle = "Hallo Welt! Dies ist der epischste Untertitel aller Zeiten."

[markup]
defaultMarkdownHandler = "goldmark"
[markup.goldmark]
defaultMarkdownHandler = 'goldmark'
[markup.goldmark]
[markup.goldmark.renderer]
# Change to 'true' if you need to render raw HTML whithin your markdown content
hardWraps = false
# change to 'true' if you need to render raw HTML within your markdown content
unsafe = true
xhtml = false

[markup.highlight]
anchorLineNos = false
codeFences = true
guessSyntax = false
# hl_Lines = ''
# hl_inline = false
lineAnchors = ''
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = true
noHl = false
style = 'monokai'
tabWidth = 4
[markup.tableOfContents]
endLevel = 5
ordered = false
startLevel = 2

# do NOT change anything below
[taxonomies]
author = "author"
tag = "tags"
category = "categories"
series = "series"

[outputs]
home = [ "HTML", "JSON", "RSS" ]
page = [ "HTML" ]
1 change: 0 additions & 1 deletion content/archive.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
title: "文章列表"
type: archive
excludeFromIndex: true
---
4 changes: 2 additions & 2 deletions content/article/migrate-to-ubuntu-server/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ sudo apt install linux-wifi-hotspot
apt install dnsmasq
```
编辑 `/etc/create_ap.conf`[示例文件](https://github.com/lakinduakash/linux-wifi-hotspot/blob/master/src/scripts/create_ap.conf)
```conf
```bash
GATEWAY=192.168.6.1
SHARE_METHOD=nat
COUNTRY=CN
Expand Down Expand Up @@ -195,7 +195,7 @@ sudo bash ./kickstart.sh --local-files /tmp/netdata/netdata-(version-number-here
> 参考:https://ehang-io.github.io/
先将提前下好的 npc 文件复制到 `/tmp/npc` 下,并创建配置文件 `/etc/np-client.conf`
```conf
```bash
[common]
server_addr=cloud.ip:8024
conn_type=kcp
Expand Down
4 changes: 2 additions & 2 deletions content/article/openwrt-under-qemu-arm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dmesg | grep -e DMAR -e IOMMU
```
启用 IOMMU:
更改 `/etc/default/grub` 添加内核启动参数:
```conf
```bash
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"
```
应用更改:
Expand Down Expand Up @@ -88,7 +88,7 @@ IOMMU Group 19:
```
这里可以看到 Wi-Fi 卡在单独的一个 IOMMU Group 里,所以就不需要进行分离。
解绑并绑定到 vfio-pci 上(通过添加内核启动参数):
```conf
```bash
# 两个参数之间只需要一个空格隔开就行,不同设备 ID 只需要用逗号隔开
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on vfio-pci.ids=8086:2723"
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ done;
由于我有一张无线网卡,想要直通到 OPNsense 所在的虚拟机中。而直接设置直通的话 qemu 会报错:`failed to add PCI capability 0x11[0x70]@0x90: table & pba overlap, or they don't fit in BARs, or don't align`

这里就需要多做一步:修改 pve 的 `/etc/pve/qemu-server/[虚拟机ID].conf`,在文件一行加上:
```conf
```bash
# 这里无线网卡在虚拟机中分配到的是 hostpci4,按需修改
args: -set device.hostpci4.x-msix-relocation=bar2
```
Expand Down
2 changes: 1 addition & 1 deletion content/article/setup-tun2socks-in-opnsense/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ tun2socks_enable="YES"
-----
## 新建 configd 文件
新建文件 `/usr/local/opnsense/service/conf/actions.d/actions_tun2socks.conf` 并填写以下内容:
```conf
```bash
[start]
command:/usr/local/etc/rc.d/tun2socks start
parameters:
Expand Down
2 changes: 1 addition & 1 deletion content/page/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "关于我"
date: 2021-06-05T23:05:37+08:00
draft: false
excludeFromTopNav: false
menu: "topnav"
weight: 1

# set the link if you want to redirect the user.
Expand Down
2 changes: 1 addition & 1 deletion content/page/donate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "❤❤❤"
date: 2021-06-06T17:20:33+08:00
draft: false
excludeFromTopNav: false
menu: "topnav"
weight: 4

# set the link if you want to redirect the user.
Expand Down
1 change: 0 additions & 1 deletion content/page/is-furry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: "福瑞控?"
date: 2021-06-05T23:15:12+08:00
draft: false
excludeFromTopNav: true
icon: "fas fa-paw"

# set the link if you want to redirect the user.
Expand Down
2 changes: 1 addition & 1 deletion content/page/more-articles.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "文章列表"
date: 2021-06-06T11:10:41+08:00
draft: false
excludeFromTopNav: false
menu: "topnav"
weight: 2

# set the link if you want to redirect the user.
Expand Down

0 comments on commit 31a66db

Please sign in to comment.