blob: f7c945935e44bbfeff28ea6db2256e03e856723d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
# Ghostwriter
Enhanced port of the Ghost "[ghostwriter](https://github.com/roryg/ghostwriter)" theme to the [Hugo](https://gohugo.io) site generator.
## Installation
Inside the folder of your Hugo site run:
```bash
$ mkdir themes
$ cd themes
$ git clone https://github.com/jbub/ghostwriter
```
For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.
## Development
After installing the theme you need to install javascript dependencies. You can use
`npm` or `yarn` 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:
```bash
hugo server
yarn 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:
```bash
yarn run build
```
## Example config.toml
To customize your theme you can use following params:
```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 = true
respectDoNotTrack = true
useSessionStorage = false
[Author]
name = "My Name"
profile = "https://google.com/+XXX"
[Taxonomies]
tag = "tags"
[Params]
mainSections = ["post"]
intro = true
headline = "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"
facebook = "https://www.facebook.com/username"
email = "XXX@example.com"
opengraph = true
shareTwitter = true
shareFacebook = true
shareGooglePlus = true
shareLinkedIn = false
dateFormat = "Mon, Jan 2, 2006"
exponeaJsUrl = ""
exponeaTarget = ""
exponeaToken = ""
exponeaTrackVisits = false
readingTime = true
readingTimeText = "Estimated reading time:"
fathomUrl = ""
fathomSiteId = ""
[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
```
You can also inject arbitrary HTML into `<head>` simply by overriding the `extra-in-head.html`
partial, which is meant for that purpose.
|