Hugo笔记
Alfama:~ ulenardis$ cd quickstart
Alfama:quickstart ulenardis$ hugo server
发布:hugo(生成public后整个上传)
升级:brew upgrade hugo
版本:Hugo v0.88.1+extended darwin/amd64
安装指定版本:
下载gz.tar后解压,在终端输入
sudo mv hugo /usr/local/bin/
修改服务器上的hugo版本:修改netlify.toml内的版本即可
mk语法学习
https://markdown.com.cn/
取消主页域名后面的文件夹路径
1,https://github.com/AJuliette/portfolio/commit/2fa8144c3bbd6ac36c6e65490bfe572f21a309d9
注意:main.html里的site.GetPage "portfolio"原文为artical,需要改一下,或者把文件夹改名为artical。
2,
<!-- 更改Home的OG标题,避免输出2个相同标题 by 猫鱼 -->
{{- if .IsHome -}}
<meta property="og:title" content="{{ .Site.Title }}" />
<meta name="twitter:title" content="{{ .Site.Title }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{- else -}}
<meta property="og:title" content="{{ .Title }} - {{ .Site.Title }}" />
<meta name="twitter:title" content="{{ .Title }} - {{ .Site.Title }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{- end -}}
<!-- end of -->