4

Hugo主题pcaman介绍

 2 years ago
source link: https://3mile.github.io/archives/119/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
A beautiful cover

Pacman

Pacman 是一个不错的 Hexo 主题,一直有冲动把这个主题转成 Hugo 的,再加上 Hugo 交流群里有朋友也提到了这个主题,于是利用周末的时间制作了这个主题:

hugo-pacman-theme

演示地址:http://coderzh.github.io/hugo-pacman-theme/

hugo-pacman-tn

文章页面:

hugo-pacman-theme

  1. 标签(标签云)
  2. 文章大纲(Table Of Content)
  3. 文章分享功能
  4. 图片点击预览(FancyBox)
  5. 多说评论(及 Disqus 评论)
  6. Google Analytics
  7. 代码高亮优化(GitHub 配色)
  8. 高度配置化,你要的东西都可以通过 config.toml 进行配置。
  1. 首先,确保安装了最新版 Hugo。下载地址:

    Hugo Release,如果使用 Mac ,直接用 Homebrew 安装:

    $ brew install hugo
    
  2. 把 hugo-pacman-theme clone 下来,放到你的 Hugo 站点的 themes 目录里(Hugo 的使用方法详见:http://www.gohugo.org/)。

    $ cd themes
    $ git clone https://github.com/coderzh/hugo-pacman-theme
    
  3. 配置文件,拷贝一份或者参考:hugo-pacman-theme/exampleSite/config.toml,配置如下:

    BaseURL = "http://coderzh.github.io/"
    LanguageCode = "zh-CN"
    HasCJKLanguage = true
    Title = "Hugo PacMan Theme Demo"
    Theme = "hugo-pacman-theme"
    pygmentsStyle = "default"
    pygmentsUseClasses = true
    RSSUri = "feed.xml"
    
    [Author]
      Name = "coderzh"
    
    [Params]
      AuthorHomepage = "http://blog.coderzh.com"
      BottomIntroduce = "Introduce1 <br/> Introduce2"
      Description = ""
      Subtitle = "subtitle"
      Weibo = "coderzh"
      WeiboID = 1816308191
      Twitter = "coderzh"
      GitHub = "coderzh"
      Facebook = "coderzh"
      LinkIn = "coderzh"
      Imglogo = "img/logo.svg"
      AuthorImg = "img/author.jpg"
      # 日期时间格式
      DateFormat = "2006年01月02日"
      MonthFormat = "2006年01月"
      FancyBox = true
    
      # 使用多说评论
      #[Params.DuoShuo]
      #  ShortName = "coderzh"
    
      # 使用 Disqus 评论
      [Params.Disqus]
        ShortName = "coderzh"
    
      # Google 统计
      [Params.GoogleAnalytics]
        ID = "UA-10147768-2"
    
      # 多语言字符串
      [Params.Strings]
        Search = "搜索"
        PageNotFound = "你访问的页面不存在"
        ShowSideBar = "显示侧边栏"
        HideSideBar = "隐藏侧边栏"
        Categories = "分类"
        Archive = "归档"
        Tags = "标签"
        TagCloud = "标签云"
        Rss = "RSS 订阅"
        TableOfContents = "文章目录"
    
    [Menu]
      [[Menu.Main]]
        Name = "首页"
        URL = "/"
        Weight = 1
      [[Menu.Main]]
        Name = "关于"
        URL = "/about"
        Weight = 2
    

该主题参考的

Pacman,使用 Hugo 的模板语法纯手工一行一行打造。有需要的朋友尽管拿去使用,有问题欢迎反馈:

GitHub 地址:https://github.com/coderzh/hugo-pacman-theme

Hugo 中文文档:http://www.gohugo.org/

文章阅读量 1000000
Code -1: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc. [N/A GET https://us.avoscloud.com/1.1/classes/Comment]
Powered By Valine
v1.4.4
© 2020 By 3mile

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK