这个网站是通过 Hugo 建站工具生成的静态网页。
使用的主题是: Hugo-theme-learn.
Special layout components are explained on learn.netlify.app/en/shortcodes.
https://www.liwen.id.au/heg/#gallery-usage https://github.com/liwenyip/hugo-easy-gallery/
使用示例:
{{< gallery >}}
{{< figure link="/assets/... .png" caption="" caption-position="center" caption-effect="fade" >}}
{{< figure link="/assets/... .png" caption="" caption-position="center" caption-effect="fade" >}}
{{< figure link="/assets/... .png" caption="" caption-position="center" caption-effect="fade" >}}
{{< /gallery >}}
{{< load-photoswipe >}}
如果使用了多个图片,最后一行只用写一次。
所有的页面都是独立的 md 文件,存放在 content 文件夹。关于 md 文件的编写规则,请参考:commonmark.org.
在本地测试站点时,请先按照说明安装 Hugo "Install Hugo"。
Mac 示例:
brew install hugo
运行站点时,在项目的根目录中打开终端,然后运行以下命令:
cd pi4j.github.io
hugo serve
启动成功后,访问地址: localhost:1313.
使用 GitHub Action 网站会在每次提交主干后重新发布。
"docs" 这个文件夹是 GitHub Action 自动创建的,所以不要手动修改,这个目录将会被推送到 GitHub Pages
详情请参考: