ghostwriter, 一个ghostwriter主题的主题

分享于 

3分钟阅读

GitHub

  繁體 雙語
A port of ghostwriter theme to Hugo.
  • 源代码名称:ghostwriter
  • 源代码网址:http://www.github.com/jbub/ghostwriter
  • ghostwriter源代码文档
  • ghostwriter源代码下载
  • Git URL:
    git://www.github.com/jbub/ghostwriter.git
    Git Clone代码到本地:
    git clone http://www.github.com/jbub/ghostwriter
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/jbub/ghostwriter
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
    Ghostwriter

    增强 Ghost" ghostwriter"主题的端口到 Hugo站点生成器。

    安装

    在Hugo站点的文件夹内运行:

    $ mkdir themes
    $ cd themes
    $ git clone https://github.com/jbub/ghostwriter

    有关更多信息,请阅读官方设置指南

    插件开发

    在安装主题之后,你需要安装javascript依赖。 你可以使用 npm 或者 yarnpackage.json 安装它们。 我们使用 webpack 来构建和封装样式。 你可以使用这里强大的组合来开发浏览器中的实时重载:

    hugo server
    yarn run watch

    更新主题样式编辑 styles/style.scss 文件。 然后,可以使用 watch 命令或者运行 build 来编译样式:

    yarn run build

    示例 config.toml

    要自定义主题,可以使用以下参数:

    baseurl = "https://example.com/"title = "mytitle"theme = "ghostwriter"languageCode = "en-us"copyright = "My Name"googleAnalytics = "XXX"disqusShortname = "XXX"[Privacy]
    [Privacy.disqus]
     disable = true[Privacy.googleAnalytics]
     anonymizeIP = truerespectDoNotTrack = trueuseSessionStorage = false[Author]
     name = "My Name"profile = "https://google.com/+XXX"[Taxonomies]
     tag = "tags"[Params]
     intro = trueheadline = "My headline"description = "My description"github = "https://github.com/XXX"gitlab = "https://gitlab.com/XXX"linkedin = "https://linkedin.com/in/XXX/"gplus = "https://google.com/+XXX"twitter = "https://twitter.com/XXX"stackoverflow = "https://stackoverflow.com/users/XXX/YYY"email = "XXX@example.com"opengraph = trueshareTwitter = trueshareFacebook = trueshareGooglePlus = trueshareLinkedIn = falsedateFormat = "Mon, Jan 2, 2006"highlightJsUrl = ""highlightJsLocalUrl = ""[Permalinks]
     post = "/:year/:month/:day/:filename/"[[menu.main]]
     name = "Blog"url = "/"weight = 1[[menu.main]]
     name = "Projects"url = "/project/"weight = 2[[menu.main]]
     name = "Contact"url = "/page/contact/"weight = 3[[menu.main]]
     name = "About"url = "/page/about/"weight = 4

    你还可以通过重写 extra-in-head.html 部分来将任意的HTML插入到 <head> 中,这是为了实现。


    theme  ghost  hugo  
    相关文章