init-blog

本次建站主要是围绕Obsidian和Osidian git插件加上Hugo完成的笔记录入,blog自动构建 首先由主仓库notes组成使用github workflow来自动完成.md转换成静态网页

 1name: github pages
 2
 3on:
 4  push:
 5    branches:
 6      - main  # Set a branch that will trigger a deploymen
 7
 8jobs:
 9  deploy:
10    runs-on: ubuntu-latest
11    steps:
12      - uses: actions/checkout@v4 
13        with:
14          submodules: true  # Fetch Hugo themes (true OR recursive)
15          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod
16          path: main
17      - name: Setup Hugo
18        uses: peaceiris/actions-hugo@v2
19        with:
20              hugo-version: 0.120.4
21              extended: true
22      - name: Checkout tools repo
23        uses: actions/checkout@v4
24        with:
25          submodules: true  # Fetch Hugo themes (true OR recursive)
26          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod
27          repository: Noirkelo/blog
28          path: blog
29      - name: Set up Python 3.10
30        uses: actions/setup-python@v1
31        with:
32          python-version: 3.10.18 
33      - name: Delete
34        run: rm -rf ./main/template
35      - name: Install dependencies
36        run: |
37          python -m pip install --upgrade pip
38          pip install obsidian-to-hugo
39          python -m obsidian_to_hugo --obsidian-vault-dir=./main --hugo-content-dir=./blog/content          
40      
41      - name: Build Web
42        run: cd blog && hugo --minify
43      - name: Deploy to Github pages
44        uses: peaceiris/actions-gh-pages@v4
45        with:
46          external_repository: Noirkelo/noirkelo.github.io
47          publish_dir: ./blog/public
48          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
49          

接下来需要排查一个故障就是hugo这个主题下面的markdown 语言的渲染有问题

1[markup.highlight]
2
3lineNos = true
4
5lineNumbersInTable = false
6
7noClasses = false

#lab