Hugo 主题
Nix
Nix 是一个适用于 Hugo 的简单、极简主题
用法
将存储库克隆到您的 hugo 主题目录
mkdir themes
cd themes
git clone https://github.com/LordMathis/hugo-theme-nix
配置
将这些参数添加到您的 config.toml
[params]
Name = "your_name"
HeaderUsername = "username"
HeaderHostname = "hostname"
About = "info_about_you"
ProfilePicture = "profile_picture_url"
HeaderUsername
和 HeaderHostname
将以 HeaderUsername@HeaderHostname ~ $
的格式显示在左侧的导航栏中。
您还可以选择将这些社交网络添加到 [params] 部分。
BitbucketID = "your_bitbucket_id"
BlueskyID = "your_bluesky_id"
CodepenID = "your_codepen"
CvURL = "your_cv_url"
Email = "your_email"
FacebookID = "your_facebook"
GithubID = "your_github"
GitlabId = "your_gitlab"
# Uses keys.openpgp.org keyserver to search your fingerprint
# https://keys.openpgp.org/search?q=your_gpg_fingerprint
GnuPGFingerprint = "your_gpg_fingerprint"
GoogleAnalytics = "your_google_analytics_id"
GoogleplusID = "your_googleplus"
InstagramID = "your_instagram"
LinkedInID = "your_linkedin"
MastodonURL = "your_mastodon_profile"
MediumID = "your_medium_id"
Mobile = "+1-201-555-0123"
PayPalMeID = "https://www.paypal.me/..."
Phone = "+1-201-555-0123"
RedditID = "your_reddit"
RSSURL = "\path-to-xml" ( default hugo generates from pages at "/index.xml" )
SlackURL = "https://join.slack.com/..."
SpotifyID = "your_spotify_id"
SoundcloudID = "your_soundcloud_id"
StackExchangeID = "your_stackexchange_id"
StackOverflowID = "your_stackoverflow_id"
TelegramID = "your_telegram"
TwitterID = "your_twitter"
TwitchID = "your_twitch_username"
XingURL = "https://www.xing.com/profile/..."
# For youtube, since there are multiple path urls please add everything after https://youtube.com/ in channel url
YoutubeID = "c/your_youtube_id"
要添加菜单项,请将 [[menu.header]]
项添加到 config.toml
。例如
[menu]
[[menu.header]]
name = "posts"
weight = 0
url = "/posts"
要添加子菜单项,请将带有父参数的 [[menu.header]]
项添加到 config.toml
。例如
[menu]
[[menu.header]]
identifier = "post"
name = "posts"
weight = 0
[[menu.header]]
parent = "post"
name = "All Posts"
url = "/posts"
[[menu.header]]
parent = "post"
name = "categories"
url = "/categories"
[[menu.header]]
parent = "post"
name = "tags"
url = "/tags"
要启用 disqus 评论,请将 disqusShortname
添加到您的 config.toml
。
您可以通过在前端内容中添加 nocomments = true
来禁用每页的 disqus 评论。
要从特定页面禁用帖子日期,请将 showpostdate = false
添加到您的相关 .md
文件中。
现在页面也支持 。除非您在页面的前端内容中填充
lastmod:
,否则它不会出现。如果您在站点的配置文件中将 enableGitInfo
设置为 true
,则它将使用包含该页面的最后一次 git 提交的日期。
许可证
Nix 在 MIT 许可证下获得许可