博客 2 mins

Hugo Theme Tony主题文档

07-05-20 / 721 Words

hugo-theme-tony

一个使用Hugo静态网站生成器的简洁强大的博客主题

预览

预览

关联项目

https://github.com/ThemeTony/tony_wordpress

作者

前端主要由 HelipengTony 制作 FFRaycoder移植

特性

  • Medium Zoom
  • 左下个人GitHub链接
  • 外链引导
  • Thumbnail
  • 首页标记页面
  • 阅读进度条
  • 谷歌统计
  • 百度推送
  • 使用Bootstrap作为CSS模板
  • 标签 (页)
  • 分类 (页)
  • 阅读进度条
  • 评论
    • Valine
  • Pinned Pages
  • JQuery
  • Remixicon https://remixicon.cn/
  • 归档页
  • i18n

Demo

https://htony.js.org/


要求

  • Hugo: 拓展版

下载和使用

下载

$ git init
$ git submodule add --depth 1 https://github.com/ThemeTony/hugo-theme-tony.git themes/tony

使用

  1. 替换config.toml

    $ rm config.toml && cp themes/tony/exampleSite/config.toml config.toml
    
  2. 新建一篇文章和about页面

    $ hugo new "posts/hello-world.md"
    $ hugo new "about/index.md"
    
  3. 启动服务:

    $ hugo server -D
    

升级

$ git submodule update --rebase --remote

自定义

查看https://github.com/ThemeTony/hugo-theme-tony/tree/master/layouts/partials/custom


[[< pageLink "title" "link" "bio" >]]
将 "[]" 用 "{}" 替换

hugo-theme-tony

简介

归档页

$ hugo new archives/_index.md

archives/_index.md

---
title: "Archives"
date: 2020-05-09T15:50:35+08:00
draft: false
type: archives
adjacentPost: false
---

友链页

$ hugo new links/_index.md

links/_index.md

---
title: "Links"
date: 2020-05-09T15:50:35+08:00
draft: false
type: links
adjacentPost: false
---

复制themes/tony/data/links.tomlblog/data/links.toml并修改。

支持的Front Matter

作用示例
title文章标题title: "Hugo Theme Tony主题文档"
date文章发布日期date: 2020-05-07T09:51:27+08:00
slug文章链接slug: "docs-of-hugo-theme-tony"
draft是否草稿draft: false
keywords文章关键词,用于HTML头部keywords: ["移植主题"]
categories分类categories: ["博客"]
tags标签tags: ["博客"]
status不允许点击(类似碎碎念),仅在主页展示status: false
categoryLink分类按钮点击时的链接categoryLink: "/"
toc是否开启目录toc: true
buy: false
buyLink: ""
buyName: ""
buyInfo: ""
buyImage: ""
buyButtonText: ""
购物链接buyLink: "https://htony.js.org"
buyName: "hugo-theme-tony"<br/>``buyInfo: "WP-Theme-Tony的hugo移植版"
buyImage: "/images/t.jpg"
buyButtonText: "官网"
thumbnail缩略图thumbnail: "https://cdn.jsdelivr.net/gh/FFRaycoder/cdn/imgs/20200507094721.png"
weight文章权重weight: 2
readingBar是否开启阅读进度条readingBar: true
adjacentPost是否显示上下页adjacentPost: true
hugo-theme-tony

hugo-theme-tony

WP-Theme-Tony的hugo移植版