Skip to content

Repository files navigation

Ghostwriter

Enhanced port of the Ghost "ghostwriter" theme to the Hugo site generator.

Installation

Inside the folder of your Hugo site run:

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

For more information read the official setup guide of Hugo.

Development

After installing the theme you need to install javascript dependencies. You can use npm to install them from package.json. We are using webpack to build and package styles. In order to develop with realtime reloading in the browser you can use this powerful combo:

hugo server
npm run watch

To update theme styles edit the styles/style.scss file. You can then either use the watch command or run build to compile the styles:

npm run build

Example config.yml

To customize your theme you can use following params:

baseurl: "https://example.com/"title: mytitletheme: ghostwriterlanguageCode: en-uscopyright: My NamegoogleAnalytics: XXXpygmentsUseClasses: truepygmentsCodefences: truemarkup:
highlight:
codeFences: trueguessSyntax: falsehl_Lines: ""lineNoStart: 1lineNos: falselineNumbersInTable: truenoClasses: truetabWidth: 2privacy:
disqus:
disable: truegoogleAnalytics:
anonymizeIP: truerespectDoNotTrack: trueuseSessionStorage: falseauthor:
name: My Nameprofile: ""taxonomies:
tag: tagsparams:
mainSections:
- postintro: trueheadline: My headlinedescription: My descriptiongithub: "https://github.com/XXX"gitlab: "https://gitlab.com/XXX"linkedin: "https://linkedin.com/in/XXX/"twitter: "https://twitter.com/XXX"stackoverflow: "https://stackoverflow.com/users/XXX/YYY"facebook: "https://www.facebook.com/username"email: xxx@example.comopengraph: trueshareTwitter: truerss: trueshareFacebook: trueshareLinkedIn: falsedateFormat: "Mon, Jan 2, 2006"exponeaJsUrl: ""exponeaTarget: ""exponeaToken: ""exponeaTrackVisits: falsereadingTime: truereadingTimeText: "Estimated reading time:"fathomUrl: ""fathomSiteId: ""plausibleAnalytics:
domain: ""# Default value is plausible.io, overwrite this if you are self-hosting or using a custom domainserverURL: ""permalinks:
post: "/:year/:month/:day/:contentbasename/"menu:
main:
- name: Blogurl: /weight: 1
- name: Projectsurl: /project/weight: 2
- name: Contacturl: /page/contact/weight: 3
- name: Abouturl: /page/about/weight: 4

You can also inject arbitrary HTML into <head> simply by overriding the extra-in-head.html partial, which is meant for that purpose.

About

A port of ghostwriter theme to Hugo.

Topics

Resources

Stars

182 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages