Hugo Theme Hello Friend NG 使用教程

Hugo Theme Hello Friend NG 使用教程

hugo-theme-hello-friend-ng Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing! hugo-theme-hello-friend-ng 项目地址: https://gitcode.com/gh_mirrors/hu/hugo-theme-hello-friend-ng

1. 项目的目录结构及介绍

Hugo Theme Hello Friend NG 的目录结构如下所示:

archetypes/
assets/
data/
docs/
exampleSite/
i18n/
images/
layouts/
static/
.eslintrc.yml
.gitignore
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
theme.toml
  • archetypes/: 存储文章原型文件,可用于创建新的文章。
  • assets/: 存储静态资源,如图片、CSS、JS 文件等。
  • data/: 存储数据文件,如 JSON、CSV 等。
  • docs/: 存储文档内容,通常用于生成网站的文档部分。
  • exampleSite/: 包含了一个示例网站的所有内容,用于演示和测试主题。
  • i18n/: 存储国际化相关的文件。
  • images/: 存储主题中使用的图片文件。
  • layouts/: 存储主题的布局文件,包括页面和部分。
  • static/: 存储静态文件,如 CSS、JS、图片等。
  • .eslintrc.yml: ESLint 配置文件,用于代码风格检查。
  • .gitignore: Git 忽略文件列表。
  • CHANGELOG.md: 记录项目更新和修改的历史。
  • CONTRIBUTING.md: 提供贡献项目的方式和指南。
  • LICENSE.md: 项目的许可证信息。
  • README.md: 项目的说明文件。
  • theme.toml: 主题配置文件。

2. 项目的启动文件介绍

启动 Hugo 项目的文件通常位于 exampleSite/ 目录中。以下是一些主要的启动文件:

  • config.toml: Hugo 网站的配置文件,包含了网站的基本设置,如标题、描述、语言等。
  • content/: 存储网站内容,包括文章、页面等。
  • static/: 存储静态资源,如 CSS、JS、图片等。

要启动项目,可以进入 exampleSite/ 目录,然后运行以下命令:

hugo server

这将启动 Hugo 的本地服务器,并在浏览器中打开一个新标签页显示网站。

3. 项目的配置文件介绍

项目的配置文件主要是 config.toml,以下是该文件的一些基本配置项:

baseurl = "localhost"
title = "My Blog"
languageCode = "zh-CN"
theme = "hello-friend-ng"
paginate = 10

[params]
dateform = "2006-01-02"
dateformShort = "Jan 2"
dateformNum = "2006-01-02"
dateformNumTime = "2006-01-02 15:04"

[params.homeSubtitle] = "一个简单而美观的博客"

[params.social]
  [[params.social]]
    name = "GitHub"
    url = "https://github.com/yourusername"

[menu.main]
  [[menu.main]]
    identifier = "blog"
    name = "博客"
    url = "/posts"
  • baseurl: 网站的基本 URL。
  • title: 网站的标题。
  • languageCode: 网站的语言代码。
  • theme: 使用的 Hugo 主题。
  • paginate: 每页显示的文章数量。
  • [params]: 主题的参数配置,包括日期格式、网站副标题等。
  • [params.social]: 社交媒体链接配置。
  • [menu.main]: 网站主导航菜单配置。

hugo-theme-hello-friend-ng Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing! hugo-theme-hello-friend-ng 项目地址: https://gitcode.com/gh_mirrors/hu/hugo-theme-hello-friend-ng

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

舒林艾Natalie

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值