設定指南

這些是套用在這個網站上的 hugo-theme-0x148 設定檔。

config.toml 檔案:

1
baseURL = "https://theme.0x148.com"
defaultContentLanguage = "en-us"
hasCJKLanguage = true
relativeURLs = true
paginate = 10

copyright = "Copyright (c) progamesigner."
enableRobotsTXT = true

pygmentsOptions = "linenos=table"
pygmentsUseClasses = true

[author]
    name = "Yang Sheng Han"
    email = "progamesigner@outlook.com"
    url = "https://progamesigner.com"

[params]
    comments = true
    toc = true

    mainSections = ["posts"]

    htmlModules = [
        "disqus",
        "google-analytics",
        "katex",
        "katex-auto-render",
        "katex-copy-tex"
    ]

[privacy]
[privacy.googleAnalytics]
    anonymizeIP = true
    respectDoNotTrack = true

[taxonomies]
    category = "categories"
    series = "series"
    tag = "tags"

languages.zh-tw.toml 檔案:

1
languageCode = "zh-TW"
languageName = "中文"
title = "Hugo 0x148 主題"
description = "一個能夠自訂化的 Hugo 主題"
weight = 20

menus.zh-tw.toml 檔案:

1
[[link]]
    title = "網站"
    name = "theme"
    url = "https://theme.0x148.com"
    weight = 0

[[link]]
    title = "GitHub"
    name = "github"
    url = "https://github.com/progamesigner/hugo-theme-0x148"
    weight = 10

[[share]]
    title = "分享到 Facebook"
    name = "facebook"
    url = "https://www.facebook.com/sharer.php?u={url}"
    weight = 10

[[share]]
    title = "轉推到 Twitter"
    name = "twitter"
    url = "https://twitter.com/intent/tweet?url={url}&text={title}"
    weight = 20

[[share]]
    title = "新增到 Trello 卡片"
    name = "trello"
    url = "https://trello.com/add-card?source={base}&url={url}&name={title}&desc={description}"
    weight = 30

[[share]]
    title = "儲存到 Pocket"
    name = "pocket"
    url = "https://getpocket.com/edit?url={url}"
    weight = 40

[[share]]
    title = "用 Email 分享"
    name = "email"
    url = "mailto:?subject={title}&body={url}"
    weight = 50

更新指南

更新 透過 submodule 更新 1 2 3 4 5 6 7 cd themes/hugo-theme-0x148 git checkout master git pull cd ../.. git add themes/hugo-theme-0x148 git commit -m "Update hugo-theme-0x148" …

安裝指南

在開始之前,需要先建立一個 Hugo 網站,可以參考 Hugo’s Quick Start Guide 的內容。

You have to accept cookie policy to use comment.