Skip to content

Commit bd890f4

Browse files
committed
Docs on GitHub Pages
1 parent 5558ad4 commit bd890f4

File tree

7 files changed

+65
-8
lines changed

7 files changed

+65
-8
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ test/destination
44
.bundle
55
pkg/
66
.jekyll-metadata
7-
site/
7+
_site/

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ end
1111

1212
# Support for Ruby < 2.2.2 & activesupport
1313
gem "activesupport", "~> 4.2" if RUBY_VERSION < "2.2.2"
14+
15+
gem "github-pages", :group => :jekyll_plugins

README.md renamed to docs/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Jekyll Archives
1+
## About Jekyll Archives
22

33
Automatically generate post archives by dates, tags, and categories.
44

@@ -20,6 +20,15 @@ plugins:
2020
⚠️ If you are using Jekyll < 3.5.0, use the `gems` key instead of `plugins`.
2121

2222
### Configuration
23-
Archives can be configured by using the `jekyll-archives` key in the Jekyll configuration (`_config.yml`) file. See the [Configuration](docs/configuration.md) page for a full list of configuration options.
2423

25-
All archives are rendered with specific layouts using certain metadata available to the archive page. The [Layouts](docs/layouts.md) page will show you how to create a layout for use with Archives.
24+
Archives can be configured by using the `jekyll-archives` key in the Jekyll configuration (`_config.yml`) file. See the [Configuration](configuration.md) page for a full list of configuration options.
25+
26+
All archives are rendered with specific layouts using certain metadata available to the archive page. The [Layouts](layouts.md) page will show you how to create a layout for use with Archives.
27+
28+
## Documentation
29+
30+
For more information, see:
31+
32+
* [Getting-started](getting-started.md)
33+
* [Configuration](configuration.md)
34+
* [Layouts](layouts.md)

docs/_config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: Jekyll Archives
2+
description: Automatically generate post archives by dates, tags, and categories.
3+
4+
permalink: pretty
5+
6+
plugins:
7+
- jekyll-seo-tag
8+
- jekyll-sitemap
9+
10+
theme: jekyll-theme-primer

docs/_layouts/default.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}" rel="stylesheet">
7+
{% seo %}
8+
</head>
9+
<body>
10+
<div class="container markdown-body">
11+
<h1>{{ site.title }}</h1>
12+
{{ content }}
13+
</div>
14+
<script src="{{ "assets/javascript/anchor-js/anchor.min.js" | relative_url }}"></script>
15+
<script>anchors.add();</script>
16+
</body>
17+
</html>

docs/configuration.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Configuration
1+
## Configuration
22

33
Archives configuration is done in the site's `_config.yml` file, under the `jekyll-archives` key.
44

55
### Default configuration
6+
67
```yml
78
jekyll-archives:
89
enabled: []
@@ -28,13 +29,17 @@ jekyll-archives:
2829
---
2930

3031
#### Enabled archives
32+
3133
| Key | Value type | Values |
3234
|-----------|-----------------|--------|
3335
| `enabled` | String or Array | `'all'` or an array of any combination of `year`, `month`, `day`, `categories`, `tags` |
3436

3537
##### Description
38+
3639
This option sets which types of archives will be created. Must be set to an array of enabled archive types, or the string 'all' (to enable all archives).
40+
3741
##### Sample values
42+
3843
```yml
3944
enabled: all
4045
enabled:
@@ -48,13 +53,17 @@ enabled:
4853
---
4954

5055
#### Default layout
56+
5157
| Key | Value type | Values |
5258
|----------|------------|--------|
5359
| `layout` | String | The layout name of the default archive layout |
5460

5561
##### Description
62+
5663
Sets the default layout to use if no type-specific layout (see [Type-specific layouts](#type-specific-layouts) below) for an archive is specified.
64+
5765
##### Sample values
66+
5867
```yml
5968
layout: archive # _layouts/archive.html
6069
layout: custom-archive-layout # _layouts/custom-archive-layout.html
@@ -63,13 +72,17 @@ layout: custom-archive-layout # _layouts/custom-archive-layout.html
6372
---
6473

6574
#### Type-specific layouts
75+
6676
| Key | Value type | Values |
6777
|-----------|---------------------------|--------|
6878
| `layouts` | Map, String &rarr; String | A map of layout type (`year`, `month`, `day`, `category`, `tag`) to its archive name. |
6979

7080
##### Description
81+
7182
Maps archive types to the layout they will be rendered in. Not all types need to be specified; those without a specific layout will fall back to the default layout.
83+
7284
##### Sample values
85+
7386
```yml
7487
layouts:
7588
year: year-archive
@@ -81,21 +94,26 @@ layouts:
8194
---
8295

8396
#### Permalinks
97+
8498
| Key | Value type | Values |
8599
|--------------|---------------------------|--------|
86100
| `permalinks` | Map, String &rarr; String | A map of layout type (`year`, `month`, `day`, `category`, `tag`) to its permalink format. |
87101

88102
##### Description
103+
89104
Maps archive types to the permalink format used for archive pages. The permalink style is the same as regular Jekyll posts and pages, but with different variables.
90105

91106
These variables are:
107+
92108
* `:year` for year archives
93109
* `:year` and `:month` for month archives
94110
* `:year`, `:month`, and `:day` for day archives
95111
* `:name` for category and tag archives
96112

97113
*Note:* trailing slashes are required to create the archive as an `index.html` file of a directory.
114+
98115
##### Sample values
116+
99117
```yml
100118
permalinks:
101119
year: '/archives/year/:year/'

docs/getting-started.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Getting started
1+
## Getting started
22

33
### Installation
44

@@ -11,6 +11,7 @@ gems:
1111
```
1212
1313
### Configuration
14-
Archives can be configured by using the `jekyll-archives` key in the Jekyll configuration (`_config.yml`) file. See the [Configuration](./configuration.md) page for a full list of configuration options.
1514
16-
All archives are rendered with specific layouts using certain metadata available to the archive page. The [Layouts](./layouts.md) page will show you how to create a layout for use with Archives.
15+
Archives can be configured by using the `jekyll-archives` key in the Jekyll configuration (`_config.yml`) file. See the [Configuration](configuration.md) page for a full list of configuration options.
16+
17+
All archives are rendered with specific layouts using certain metadata available to the archive page. The [Layouts](layouts.md) page will show you how to create a layout for use with Archives.

0 commit comments

Comments
 (0)