Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md - github.com/syui/hugo-theme-air.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eb762682b5fb0015d2443646ce1200c86887164a (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# AIR theme for hugo

Air is a single-column theme for [Hugo](http://gohugo.io/).
Ported from [Casper theme for Ghost ](https://github.com/TryGhost/Casper), [vjeantet/hugo-theme-casper](https://github.com/vjeantet/hugo-theme-casper)

- github actions

- blog demo : http://syui.github.io/hugo-theme-air

- blog source : https://github.com/syui/hugo-theme-air

![Hugo Air Theme screenshot](https://raw.githubusercontent.com/syui/hugo-theme-air/master/images/screen.gif)

```bash
$ git clone https://github.com/syui/hugo-theme-air

$ cd hugo-theme-air

$ hugo

$ hugo server
---------------------------------
$ curl 127.0.0.1:1313/hugo-theme-air 
```
## Background Image

[https://github.com/syui/hugo-theme-air/blob/master/static/css/screen.css#L1995](https://github.com/syui/hugo-theme-air/blob/master/static/css/screen.css#L1995)

...`slow`

## Features

* [VincentGarreau/particles.js](https://github.com/VincentGarreau/particles.js/)
* Google Analytics (optional)
* Disqus ( can disable comments by content)
* Share buttons on Facebook, Twitter, Google (can disable share by content)
* Big cover image (optional)
* Custom cover by content (optional)
* Tagging
* Pagination
* Menu

# Theme usage and asumptions
* All blog posts are in the ```post``` folder (```content/post```)
* The homepage displays a paginated list of contents from the post Section (other contents may be added to main menu, see bellow)

# Installation

## Installing this theme

    mkdir themes
    cd themes
    git clone https://github.com/syui/hugo-theme-air

## Build your website with this theme

    hugo server -t hugo-theme-air

# Configuration

**config.toml**

``` bash
$ cat config.toml.backup

$ cp config.toml.backup config.toml
```

Example : [config.toml](https://github.com/syui/hugo-theme-air/blob/master/config.toml.backup)

## Multiple authors configuration

In addition to providing data for a single author as shown in the example above, multiple authors
can be configured via data/authors/\*.(yml, toml, json) entries. If the key provided in
.Site.Params.author matched a data/authors/\* entry, it will be used as the default. Overrides
per page can be done by a simple author = other_author_key entry in the front matter. For those
pages where you want to omit the author block completely, a .Params.noauthor entry is also
available.

``` bash
$ hugo new post/foo.md

$ cat content/post/foo.md
```

Example author definition file:


``` yml
name: John Doe
bio: The most uninteresting man in the world.
location: Normal, IL
website: http://example.com

```

Example override author per page file:
``` toml
+++
author = ""
date = "2014-07-11T10:54:24+02:00"
title = ""
...
+++

Contents here

```

## Metadata on each content file, example

``` toml
+++
author = ""
date = "2014-07-11T10:54:24+02:00"
draft = false
title = "dotScale 2014 as a sketch"
slug = "dotscale-2014-as-a-sketch"
tags = ["event","dotScale","sketchnote"]
image = "images/2014/Jul/titledotscale.png"
comments = true     # set false to hide Disqus comments
share = true        # set false to share buttons
menu = ""           # set "main" to add this content to the main menu
+++

Contents here
```

## Create new content based with default metadata from this theme
You can easyly create a new content with all metadatas used by this theme, using this command 
```
hugo new -t hugo-theme-air post/my-post.md
```
## Hosting for GitHub Pages

```bash
# build
$ hugo 

$ cd public

# preview
$ jekyll server
$ rm -rf _site

# make repository
$ git init
$ git remote add origin $url
$ git add .
$ git commit -m "first commit"
$ git push -u origin master

# push branch:gh-pages
$ git checkout -b gh-pages
$ git commit -m "open pages"
$ git push -u origin gh-pages

# open
$ curl user.github.io/repository
```

## change logo

Replace `static/images/user.png` with myfile.

Please close the browser and rerun hugo server.

point :`BaseUrl`, `authorwebsite` last slash `/`

```toml
BaseUrl= "https://localhost/"

[params]
  authorwebsite = "https://localhost"
  logo = "images/user.png"
```

## content title sort

rewrite `layout/index.html`

```html
{{ range $index, $page := $paginator.Pages }}
  {{ .Render "li" }}
{{ end }}
```

```html
{{ range .Site.RegularPages.ByTitle }}
  {{ .Render "li"}}
{{ end }}
```

# Contact me

:beetle: open an issue in github

:bird: [https://twitter.com/syui__](https://twitter.com/syui__)