站名“菠菜眾長”,取“兼收並蓄,博採眾長”之意。建站的初衷不是为了炫耀所知,而是记录无知。
博客内容主要以 Web 前端开发方向为主,分享一些有趣程序、技巧、开发教程、心情和学习记录等。
▸ .github/ # GitHub configuration
▸ .scripts/ # custom scripts
▸ .shell/ # shell commands for hugo project, entrance: hugo_main.sh
▸ archetypes/ # page archetypes (like scaffolds of archetypes)
▸ assets/ # css, js, third-party libraries etc.
▸ config/ # configuration files
▸ content/ # markdown files for hugo project
▸ private/ # private submodule for encrypted content
▸ data/ # blog data (allow: yaml, json, toml), e.g. friends.yml
▸ public/ # build directory
▸ static/ # static files, e.g. favicon.ico
▸ themes/ # theme submodules
首先点上 Star 😜,然后根据操作系统(Windows、Linux、macOS)安装最新版本的 Hugo(>= 0.109.0)。
git clone --recursive [email protected]:Lruihao/hugo-blog.git
有两种方法可以启动这个博客。
npm install
# build the blog
npm run build
# run a local debugging server with watch
npm run server
# run a local debugging server in production environment
npm run server:production
# update theme submodules
npm run update:theme
如果没有全局安装 Hugo,甚至可以通过 npm install hugo-bin --save-dev
来安装一个 Hugo 的包装器。
package.json
需配置 extended
版本:
{
// ...
"hugo-bin": {
"buildTags": "extended"
}
}
再通过 npx hugo
启动。
# Development environment
hugo server --disableFastRender --navigateToChanged --bind 0.0.0.0
# Production environment
hugo server --disableFastRender --navigateToChanged --environment production --bind 0.0.0.0
此外,还可以运行 hugo_main.sh
来选择常用的 Hugo 命令:
cd .shell && sh hugo_main.sh
--------------Hugo Admin--------------
Please enter the serial number to work
--------------------------------------
1. post
2. server
3. server:production
4. build
5. submodule-sync
6. push
--------------------------------------
Press Ctrl+C to stop
本站内容采用 知识共享署名-非商业性使用 4.0(CC BY-NC 4.0) 国际许可协议。(content/private
除外)