跳过正文
  1. 文档/

入门指南

2 分钟·
目录
部署教程 - 这篇文章属于一个选集。
§ 3: 本文
本节内容需要已经阅读了 安装 Blowfish 主题

基础设置
#

在刚刚安装完成、创建内容之前,有几个设置需要关注。从 hugo.toml 开始,设置 baseURLlocale 参数。

# config/_default/hugo.toml

baseURL = "https://your_domain.com/"
locale = "en"

下一步是设置语言。尽管 Blowfish 支持多语言,但是 hugo.toml 只能配置一个主语言。

config/_default 文件夹中找到 languages.en.toml。如果你的主语言是英语,你可以直接使用此文件。否则需要重命名为主语言对应的文件名。

# config/_default/languages.en.toml

title = "My awesome website"

[params.author]
name = "My name"
image = "img/author.jpg"
headline = "A generally awesome human"
bio = "A little bit about me"
links = [
  { twitter = "https://twitter.com/username" }
]

颜色方案
#

Blowfish 提供多种预设配色方案。你可以通过 params.toml 中的 colorScheme 参数来设置。

内置配色方案包括:blowfishavocadobluecongocaribbeancherryfiremarvelneonoceanslateplum 等。

整理内容
#

默认情况下,Blowfish 不强制你使用特定类型的内容。这样你可以随意自定义你想要的内容。

.
├── assets
│   └── img
│       └── author.jpg
├── config
│   └── _default
├── content
│   ├── _index.md
│   ├── about.md
│   └── posts
│       ├── _index.md
│       ├── first-post.md
│       └── another-post
│           ├── aardvark.jpg
│           └── index.md
└── themes
    └── blowfish

菜单
#

Blowfish 有两个可以定制的菜单:main 菜单和 footer 菜单。

# config/_default/menus.toml

[[main]]
  name = "Blog"
  pageRef = "posts"
  weight = 10

[[main]]
  name = "GitHub"
  pre = "github"
  url = "https://github.com/nunocoracao/blowfish"
  weight = 30

[[footer]]
  name = "Privacy"
  url = "https://external-link"

两个菜单都可以在 menus.zh-cn.toml 中配置。

更多配置
#

详细的配置请参考 Blowfish 文档.

部署教程 - 这篇文章属于一个选集。
§ 3: 本文

相关文章