Kr Younger 6 vuotta sitten
vanhempi
commit
3b75854588

+ 6
- 0
.gitmodules Näytä tiedosto

@@ -0,0 +1,6 @@
1
+[submodule "themes/ananke"]
2
+	path = themes/ananke
3
+	url = https://github.com/budparr/gohugo-theme-ananke.git
4
+[submodule "themes/hugo-alabaster-theme"]
5
+	path = themes/hugo-alabaster-theme
6
+	url = https://github.com/digitalcraftsman/hugo-alabaster-theme.git

+ 35
- 1
config.toml Näytä tiedosto

@@ -1,3 +1,37 @@
1 1
 baseURL = "http://example.org/"
2 2
 languageCode = "en-us"
3
-title = "My New Hugo Site"
3
+title = "Yoda"
4
+theme = "hugo-alabaster-theme"
5
+
6
+
7
+disqusShortname = ""
8
+googleAnalytics = ""
9
+
10
+[params]
11
+	name = "Alabaster"
12
+	description = "A documentation theme for Hugo."
13
+
14
+	github_user   = "digitalcraftsman"
15
+	github_repo   = "hugo-alabaster-theme"
16
+	github_banner = true
17
+
18
+	custom_css = []
19
+	custom_js  = []
20
+
21
+	highlightjs = "css/highlight.css"
22
+	favicon = "favicon.ico"
23
+
24
+[params.sidebar]
25
+	logo = "favicon.ico"
26
+
27
+
28
+	github_button  = true
29
+	travis_button  = false
30
+	codecov_button = false
31
+	gratipay = ""
32
+
33
+	show_relations = true
34
+
35
+[params.footer]
36
+	copyright = "[Digitalcraftsman](https://github.com/digitalcraftsman)"
37
+	show_powered_by = true

+ 62
- 0
content/adding-content/index.md Näytä tiedosto

@@ -0,0 +1,62 @@
1
+---
2
+date: 2016-04-23T20:26:34+02:00
3
+menu: "main"
4
+title: Adding content
5
+weight: 20
6
+---
7
+
8
+## Hello world
9
+
10
+Let's create our first content file for your documentation. Open a terminal and add the following command for each new file you want to add. Replace `<section-name>` with a general term that describes your document in detail.
11
+
12
+```sh
13
+hugo new <section-name>/filename.md
14
+```
15
+
16
+Visitors of your website will find the final document under `www.example.com/<section-name>/filename/`.
17
+
18
+Since it's possible to have multiple content files in the same section I recommend to create at least one `index.md` file per section. This ensures that users will find an index page under `www.example.com/<section-name>`.
19
+
20
+## Homepage
21
+
22
+To add content to the homepage you need to add a small indicator to the frontmatter of the content file:
23
+
24
+```toml
25
+type: homepage
26
+```
27
+
28
+Otherwise the theme will not be able to find the corresponding content file.
29
+
30
+## Table of contents
31
+
32
+You maybe noticed that the menu on the left contains a small table of contents of the current page. All `<h2>` tags (`## Headline` in Markdown) will be added automatically.
33
+
34
+## Admonitions
35
+
36
+Admonition is a handy feature that adds block-styled side content to your documentation, either notes or warnings. It can be enabled by using the corresponding [shortcodes](http://gohugo.io/extras/shortcodes/) inside your content:
37
+
38
+```md
39
+{{</* admonition title="Note" type="note" */>}}
40
+Something good to know.
41
+{{</* /admonition */>}}
42
+```
43
+
44
+will be rendered as
45
+
46
+{{< admonition title="Note" type="note" >}}
47
+Lorem ipsum dolor.
48
+{{< /admonition >}}
49
+
50
+The `type` parameter can optionally be used to either display a `note` or `warning`. The last type is the default one. 
51
+
52
+```md
53
+{{</* admonition title="Caution" */>}}
54
+Don't try this at home!
55
+{{</* /admonition */>}}
56
+```
57
+
58
+becomes
59
+
60
+{{< admonition title="Caution" >}}
61
+Don't try this at home!
62
+{{< /admonition >}}

+ 222
- 0
content/getting-started/index.md Näytä tiedosto

@@ -0,0 +1,222 @@
1
+---
2
+date: 2016-04-23T15:57:19+02:00
3
+menu: "main"
4
+title: Getting Started
5
+weight: 10
6
+---
7
+
8
+## Installation
9
+
10
+### Install Hugo
11
+
12
+Hugo itself is just a single binary without dependencies on expensive runtimes like Ruby, Python or PHP and without dependencies on any databases. 
13
+
14
+{{< admonition title="Note" type="note" >}}
15
+Currently, this theme makes use of features that will be part of the Hugo v0.16 release. You have to [compile](https://github.com/spf13/hugo/#clone-the-hugo-project-contributor) the latest developement version yourself.
16
+{{< /admonition >}}
17
+
18
+<!--You just need to download the [latest version](https://github.com/spf13/hugo/releases). For more information read the official [installation guides](http://gohugo.io/overview/installing/). -->
19
+
20
+Let's make sure Hugo is set up as expected. You should see a similar version number in your terminal:
21
+
22
+```sh
23
+hugo version
24
+# Hugo Static Site Generator v0.15 BuildDate: 2016-01-03T12:47:47+01:00
25
+```
26
+
27
+### Install Alabaster
28
+
29
+Next, assuming you have Hugo up and running the `hugo-alabaster` theme can be installed with `git`:
30
+
31
+```sh
32
+# create a new Hugo website
33
+hugo new site my-awesome-docs
34
+
35
+# move into the themes folder of your website
36
+cd my-awesome-docs/themes/
37
+
38
+# download the theme
39
+git clone git@github.com:digitalcraftsman/hugo-alabaster-theme.git
40
+```
41
+
42
+## Setup
43
+
44
+Next, take a look in the `exampleSite` folder at `themes/hugo-alabaster-theme/`. This directory contains an example config file and the content that you are currently reading. It serves as an example setup for your documentation. 
45
+
46
+Copy at least the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary. 
47
+
48
+Hugo includes a development server, so you can view your changes as you go -
49
+very handy. Spin it up with the following command:
50
+
51
+```sh
52
+hugo server
53
+```
54
+
55
+Now you can go to [localhost:1313](http://localhost:1313) and the Alabaster
56
+theme should be visible. You can now start writing your documentation, or read
57
+on and customize the theme through some options.
58
+
59
+## Configuration
60
+
61
+Before you are able to deploy your documentation you should take a few minute to adjust some information in the `config.toml`. Open the file in an editor:
62
+
63
+```toml
64
+baseurl = "http://replace-this-with-your-hugo-site.com/"
65
+languageCode = "en-us"
66
+title = "Alabaster"
67
+
68
+disqusShortname = ""
69
+googleAnalytics = ""
70
+
71
+[params]
72
+  name = "Alabaster"
73
+  description = "A documentation theme for Hugo."
74
+```
75
+
76
+Add some metadata about your theme. The `name` and `description` will appear in the top left of the sidebar. Furthermore, you can enable tracking via Google Analytics by entering your tracking code.
77
+
78
+To allow users direct feedback to your documentation you can also enable a comment section powered by Disqus. The comment section will appear on each page except the homepage. 
79
+
80
+
81
+## Options
82
+
83
+### Adding a custom favicon
84
+
85
+Favicons are small small icons that are displayed in the tabs right next to the title of the current page. As with the logo above you need to save your favicon in `static/` and link it relative to this folder in the config file:
86
+
87
+```toml
88
+[params]
89
+  favicon = "favicon.ico"
90
+```
91
+
92
+### Syntax highlighting
93
+
94
+This theme uses the popular [Highlight.js](https://highlightjs.org/) library to colorize code examples. The default theme is called "Foundation" with a few small tweaks. You can link our own theme if you like. Again, store your stylesheet in the `static/` folder and set the relative path in the config file:
95
+
96
+```toml
97
+[params]
98
+  # Syntax highlighting theme
99
+  highlightjs  = "path/to/theme.css"
100
+```
101
+
102
+Alternatively, you can use Pygments to highlight code blocks. If `highlightjs` does not contain a path it defaults to the Pygments stylesheet. Read the [Hugo docs](https://gohugo.io/extras/highlighting#pygments) for more information.
103
+
104
+If you used GitHub flavoured Markdown with code fences like below
105
+
106
+````
107
+```toml
108
+[params]
109
+  # Syntax highlighting theme
110
+  highlightjs  = "path/to/theme.css"
111
+```
112
+````
113
+
114
+you have to add the `pygmentsuseclasses = true` option to the config file.
115
+
116
+### Small tweaks
117
+
118
+This theme provides a simple way for making small adjustments, that is changing some margins, centering text, etc. Simply put the CSS and Javascript files that contain your adjustments in the `static/` directory (ideally in subdirectories of their own) and include them via the `custom_css` and `custom_js`
119
+variables in your `config.toml`. Reference the files relative to `static/`:
120
+
121
+```toml
122
+[params]
123
+  custom_css = [
124
+    "foo.css",
125
+    "bar.css"
126
+  ]
127
+
128
+  custom_js = ["buzz.js"]
129
+```
130
+
131
+
132
+## Sidebar
133
+
134
+### Adding a logo
135
+
136
+If your project has a logo, you can add it to the sidebar by defining the variable `logo`. Save your logo somewhere in the `static/` folder and reference the file relative to this location:
137
+
138
+```toml
139
+[params.sidebar]
140
+  logo = "images/logo.png"
141
+```
142
+
143
+### Adding menu entries
144
+
145
+Once you created your first content files you can link them manually in the sidebar on the left. A menu entry has the following schema:
146
+
147
+```toml
148
+[[menu.main]]
149
+  name   = "Home"
150
+  url    = "/"
151
+  weight = 0
152
+```
153
+
154
+`name` is the title displayed in the menu and `url` the relative URL to the content. The `weight` attribute allows you to modify the order of the menu entries. A menu entry appears further down the more weight you add.
155
+
156
+Instead of just linking a single file you can enhance the sidebar by creating a nested menu. This way you can list all pages of a section instead of linking them one by one (without nesting).
157
+
158
+You need extend the frontmatter of each file content file in a section slightly. The snippet below registers this content file as 'child' of a menu entry that already exists.
159
+
160
+```yaml
161
+menu: main
162
+weight: 0
163
+```
164
+
165
+`main` specifies to which menu the content file should be added. `main` is the only menu in this theme by default. `parent` let's you register this content file to an existing menu entry, in this case the `Home` link. Note that the parent in the frontmatter needs to match the name in `config.toml`.
166
+
167
+### Buttons
168
+
169
+Above the menu you can include multiple buttons, e.g. the number of stars on GitHub or the current build status of [TravisCI](https://travis-ci.org/).
170
+
171
+{{< admonition title="Note" type="note" >}}
172
+It is required that you add your username and the URL to the project you want to document. Otherwise the buttons will not be able to display any information.
173
+{{< /admonition >}}
174
+
175
+If your project is hosted on GitHub, add the repository link and your username to the
176
+configuration. 
177
+
178
+```toml
179
+[params]
180
+  github_user   = "digitalcraftsman"
181
+  github_repo   = "hugo-alabaster-theme"
182
+  github_banner = true
183
+```
184
+
185
+`github_banner` adds the black banner in the top right of each page and simply links to your project on GitHub.
186
+
187
+Now you can define which buttons you want to show:
188
+
189
+```toml
190
+[params.sidebar]
191
+  github_button  = true
192
+  travis_button  = false
193
+  codecov_button = false
194
+  gratipay = ""
195
+```
196
+
197
+1. `github_button` displays the number of stars of your repository on GitHub
198
+1. `travis_button` displays the current build status of your project
199
+1. `codecov_button` display the code coverage of your tests thanks to [CodeCov](https://codecov.io/)
200
+1. `gratipay` allows you to collect tips via [GratiPay](https://gratipay.com/). Enter your username after you signed up.
201
+
202
+
203
+### Relations
204
+
205
+Includes links to the previous and next page in a section those exist under the menu as "Related Topics". This makes the navigation for users easier. It can be disabled if each of your website section's contain only contain a single page. 
206
+
207
+```toml
208
+[params.sidebar]
209
+   show_relations = true
210
+```
211
+
212
+## Footer
213
+
214
+The footer is very simple. Your `copyright` notice can be formatted with Markdown. This can be handy if you want to format text slightly or you want to include a hyperlink. 
215
+
216
+`show_powered_by` allows you hide the showcase of the used tools. Some promotion is always appreciated.
217
+
218
+```toml
219
+[params.footer]
220
+  copyright = "[Digitalcraftsman](https://github.com/digitalcraftsman)"
221
+  show_powered_by = true
222
+```

+ 12
- 0
content/index.md Näytä tiedosto

@@ -0,0 +1,12 @@
1
+---
2
+date: 2016-04-23T15:21:22+02:00
3
+title: Yoda
4
+type: homepage
5
+menu: main
6
+weight: 0
7
+---
8
+
9
+## What is Yoda?
10
+
11
+Yoda is a simple website for ZipCode.
12
+

+ 9
- 0
content/posts/howdy.md Näytä tiedosto

@@ -0,0 +1,9 @@
1
+---
2
+title: "Howdy"
3
+date: 2018-05-14T13:32:01-04:00
4
+draft: false
5
+---
6
+
7
+# Howdy
8
+
9
+This here is Yoda.

+ 34
- 0
content/roadmap/index.md Näytä tiedosto

@@ -0,0 +1,34 @@
1
+---
2
+date: 2016-04-23T20:08:11+01:00
3
+title: Roadmap
4
+menu: main
5
+weight: 30
6
+---
7
+
8
+Quo vadis? The port of the original [Alabaster theme](https://github.com/bitprophet/alabaster) has replicated nearly all of its features. A few are still missing, but I've good news: the Hugo community is actively working on this issues. Maybe with the next release of Hugo we can abandon this list. Stay tuned.
9
+
10
+## Planned features
11
+
12
+### Localization
13
+
14
+Currently, it is possible to collect all strings in a single place for easy customization. However, this only enables you to define all strings in a single language. This approach is quite limiting in terms of localization support. Therefore, I decided to wait for a native integration. This way we can avoid a second setup of all strings in your website.
15
+
16
+Keep an eye on [#1734](https://github.com/spf13/hugo/issues/1734).
17
+
18
+### Search
19
+
20
+Beside third-party services, some hacky workarounds and Grunt-/Gulp-based scripts that only require unnecessary dependencies, future versions of Hugo will support the generation of a content index as a core feature.
21
+
22
+Keep an eye on [#1853](https://github.com/spf13/hugo/pull/1853).
23
+
24
+### Styling options
25
+
26
+The original theme allowed users to customize the layout directly from the [configuration](https://github.com/bitprophet/alabaster#style-colors). There is a similar idea that tries to template CSS stylesheets - this means every stylesheet would be treat as a template that can access the values from your config file.
27
+
28
+Keep an eye on [#1431](https://github.com/spf13/hugo/pull/1431).
29
+
30
+## Contributing
31
+
32
+Did you found an bug or you would like to suggest a new feature? I'm open for feedback. Please open a new [issue](https://github.com/digitalcraftsman/hugo-alabaster-theme/issues) and let me know what you think.
33
+
34
+You're also welcome to contribute with [pull requests](https://github.com/digitalcraftsman/hugo-alabaster-theme/pulls).

+ 20
- 0
content/theme-notes/index.md Näytä tiedosto

@@ -0,0 +1,20 @@
1
+---
2
+date: 2016-04-23T15:21:22+02:00
3
+title: Theme Notes
4
+menu: main
5
+weight: 0
6
+---
7
+
8
+## What is Alabaster?
9
+
10
+[Alabaster](https://github.com/bitprophet/alabaster) was originally a theme for the popular documentation tool [Sphinx](http://www.sphinx-doc.org/en/stable/). This theme port to Hugo theme is all about documentations. It should allow you to easily create a documentation for your projects.
11
+
12
+[Fabric](http://www.fabfile.org/) and [Invoke](http://www.pyinvoke.org/) are two examples of the Alabaster theme in the wild.
13
+
14
+The following pages will guide you through the setup, introduce you to the very basics of [Hugo](https://gohugo.io) and show you the capabilities of this theme. Have a look at the [Roadmap]({{< relref "roadmap/index.md" >}}) if you're curious about what comes next.
15
+
16
+## Acknowledgements
17
+
18
+Last but not I want to give a big shout-out to [Jeff Forcier](https://github.com/bitprophet), [Kenneth Reitz](https://github.com/kennethreitz) and [Armin Ronacher](https://github.com/mitsuhiko). Their work and modifications on the original codebase made this port possible.
19
+
20
+Furthermore, thanks to [Steve Francia](https://gihub.com/spf13) for creating Hugo and the [awesome community](https://github.com/spf13/hugo/graphs/contributors) around the project.

+ 0
- 0
static/.gitkeep Näytä tiedosto


+ 1
- 0
themes/ananke

@@ -0,0 +1 @@
1
+Subproject commit 41727a62e2afa9cdb1c828ddeafc2928d5566c3b

+ 1
- 0
themes/hugo-alabaster-theme

@@ -0,0 +1 @@
1
+Subproject commit 3510ef22eabe7b91774f89a9acf467ac3057d908