博客使用方法记录

Published on: July 29, 2021 | Reading Time: 1 min | Last Modified : July 29, 2021

备忘

一些语法,防止遗忘,记录下来

Usage:
  hugo [flags]
  hugo [command]

Available Commands:
  config      Print the site configuration
  convert     Convert your content to different formats
  deploy      Deploy your site to a Cloud provider.
  env         Print Hugo version and environment info
  gen         A collection of several useful generators.
  help        Help about any command
  import      Import your site from others.
  list        Listing out various types of content
  mod         Various Hugo Modules helpers.
  new         Create new content for your site
  server      A high performance webserver
  version     Print the version number of Hugo

常用的命令也就是hugo new somthing.md创建自己的博客, 然后hugo server进行渲染预览,cd到/public目录下进行git命令操作。

按照顺序

git diff
git add -A
git commit -m "XXX"
git push origin main

如果有奇怪情况,可以删除/public目录重新生成。

安装hugo的时候,按着官方走记得很快就安装好了,我这里使用的是ubuntu(建议使用最新的长期版LST版) 需要提醒的只有安装版本hugo_extended_0.86.0_Linux-64bit.deb