Skip to content

Commit 8af8dbf

Browse files
committed
Forestry setup
1 parent f619986 commit 8af8dbf

File tree

13 files changed

+215
-54
lines changed

13 files changed

+215
-54
lines changed

.eleventy.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ module.exports = function(config) {
5555
// Plugins
5656
config.addPlugin(rssPlugin);
5757
config.addPlugin(syntaxHighlight);
58+
59+
/* Forestry instant previews
60+
if( process.env.ELEVENTY_ENV == "staging" ) {
61+
eleventyConfig.setBrowserSyncConfig({
62+
host: "0.0.0.0"
63+
});
64+
}*/
5865

5966
// 404
6067
config.setBrowserSyncConfig({
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
label: Post
3+
hide_body: false
4+
fields:
5+
- type: text
6+
name: title
7+
label: title
8+
- type: datetime
9+
name: date
10+
label: date
11+
default: now
12+
config:
13+
date_format: YYYY-MM-DD
14+
export_format: YYYY-MM-DD
15+
- type: list
16+
name: tags
17+
label: tags
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
label: Design Tokens
3+
hide_body: true
4+
fields:
5+
- type: field_group
6+
name: size-scale
7+
label: size-scale
8+
fields:
9+
- type: text
10+
name: base
11+
label: base
12+
- type: text
13+
name: '300'
14+
label: '300'
15+
- type: text
16+
name: '500'
17+
label: '500'
18+
- type: text
19+
name: '600'
20+
label: '600'
21+
- type: text
22+
name: '700'
23+
label: '700'
24+
- type: text
25+
name: '800'
26+
label: '800'
27+
- type: text
28+
name: '900'
29+
label: '900'
30+
- type: text
31+
name: max
32+
label: max
33+
- type: field_group
34+
name: colors
35+
label: colors
36+
fields:
37+
- type: color
38+
name: primary
39+
label: primary
40+
config:
41+
color_format: Hex
42+
default: "#173854"
43+
- type: color
44+
name: primary-shade
45+
label: primary-shade
46+
config:
47+
color_format: Hex
48+
default: "#102538"
49+
- type: color
50+
name: primary-glare
51+
label: primary-glare
52+
config:
53+
color_format: Hex
54+
default: "#22547c"
55+
- type: color
56+
name: highlight
57+
label: highlight
58+
config:
59+
color_format: Hex
60+
default: "#fedb8b"
61+
- type: color
62+
name: light
63+
label: light
64+
config:
65+
color_format: Hex
66+
default: "#ffffff"
67+
- type: color
68+
name: mid
69+
label: mid
70+
config:
71+
color_format: Hex
72+
default: "#cccccc"
73+
- type: color
74+
name: dark
75+
label: dark
76+
config:
77+
color_format: Hex
78+
default: "#333333"
79+
- type: color
80+
name: slate
81+
label: slate
82+
config:
83+
color_format: Hex
84+
default: "#404040"
85+
- type: field_group
86+
name: fonts
87+
label: fonts
88+
fields:
89+
- type: textarea
90+
name: base
91+
label: base
92+
- type: text
93+
name: serif
94+
label: serif
95+
pages:
96+
- src/_data/tokens.json

.forestry/settings.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
new_page_extension: md
3+
auto_deploy: false
4+
admin_path: ''
5+
webhook_url:
6+
sections:
7+
- type: heading
8+
label: Content
9+
- type: directory
10+
path: src/posts
11+
label: Posts
12+
create: documents
13+
match: "*.md"
14+
templates:
15+
- post
16+
- type: heading
17+
label: Globals
18+
- type: document
19+
path: src/_data/tokens.json
20+
label: Theme settings
21+
upload_dir: src/images
22+
public_path: "/images"
23+
front_matter_path: ''
24+
use_front_matter_path: false
25+
file_template: ":filename:"
26+
build:
27+
preview_env:
28+
- ELEVENTY_ENV=development
29+
preview_output_directory: src/dist
30+
install_dependencies_command: npm install
31+
preview_docker_image: forestryio/node:12
32+
mount_path: "/srv"
33+
working_dir: "/srv"
34+
instant_preview_command: npm start

README.md

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
# A simple starter kit for Eleventy
22

3-
Hylia is a lightweight [Eleventy](https://11ty.io) starter kit with [Netlify CMS](https://www.netlifycms.org/) pre-configured, so that you can one-click install a progressive, accessible blog in minutes. It also gives you a well organised starting point to extend it for yourself.
3+
Hylia is a lightweight [Eleventy](https://11ty.io) starter kit with [Forestry CMS](https://forestry.io/) pre-configured, so that you can one-click install a progressive, accessible blog in minutes. It also gives you a well organised starting point to extend it for yourself.
44

5-
Get started now by **[deploying Hylia to Netlify.][deploy-to-netlify]**
6-
7-
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)][deploy-to-netlify]
5+
[![Import to Forestry](https://assets.forestry.io/import-to-forestryK.svg)](https://app.forestry.io/quick-start?repo=dirtyf/hylia&provider=github&branch=forestry&engine=other&preview=https://hankchizljaw.imgix.net/hylia-github.jpg?auto=format&q=60)
86

97
<img src="https://hankchizljaw.imgix.net/hylia-github.jpg?auto=format&q=60" width="550" />
108

119
## Features
1210

1311
Hylia version 0.7.0 features:
1412

15-
✍️ A pre-configured [Netlify CMS](https://www.netlifycms.org/) setup
1613
🎨 Customisable design tokens to make it your own
1714
🌍 Customisable global data and navigation
1815
📂 Tags and tag archives
19-
✅ Progressively enhanced, semantic and accessible
2016
🎈 _Super_ lightweight front-end
17+
✅ Progressively enhanced, semantic and accessible
2118
🚰 Sass powered CSS system with utility class generator
2219
⚙️ Service worker that caches pages so people can read your articles offline
2320
🚀 An RSS feed for your posts
2421
💌 A basic contact form, ready for [Netlify Forms](https://docs.netlify.com/forms/setup/#html-forms)
22+
✍️ A pre-configured [Forestry CMS](https://forestry.io/) setup
2523

2624
## Roadmap
2725

@@ -38,22 +36,6 @@ Hylia version 0.7.0 features:
3836

3937
---
4038

41-
## Getting started
42-
43-
### Method one: One-Click Deploy to Netlify
44-
45-
You can [deploy Hylia to Netlify with one click][deploy-to-netlify] and you’ll be up and running in minutes!
46-
47-
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)][deploy-to-netlify]
48-
49-
I recorded a quick start video of me deploying Hylia to Netlify and getting the CMS set up. [Check it out here](https://youtu.be/0hM_0BH-Y_A).
50-
51-
### Method two: Clone / Fork
52-
53-
1. Clone or fork this repo: `git clone https://github.com/hankchizljaw/hylia`
54-
2. `cd` into the project directory and run `npm install`
55-
3. Once all the dependencies are installed run `npm start`
56-
4. Open your browser at `http://localhost:8080` and away you go!
5739

5840
## Terminal commands
5941

@@ -83,18 +65,11 @@ npm run sass:tokens
8365

8466
## Getting started with the CMS
8567

86-
Before you can use the CMS, you need to do some config in Netlify. Luckily they provide a [very handy guide to get started](https://www.netlify.com/docs/identity/).
68+
[![Import to Forestry](https://assets.forestry.io/import-to-forestryK.svg)](https://app.forestry.io/quick-start?repo=dirtyf/hylia&provider=github&branch=forestry&engine=other&preview=https://camo.githubusercontent.com/8bae59778d46d15e98e701d5b6f4d0cb3a2cb880/68747470733a2f2f68616e6b6368697a6c6a61772e696d6769782e6e65742f68796c69612d6769746875622e6a70673f6175746f3d666f726d617426713d3630)
8769

88-
In short, though:
70+
Once the site is imported in Forestry, go to settings/previews to start the preview server.
8971

90-
- Once you’ve set up the site on Netlify, go to “Settings” > “Identity” and enable Identity
91-
- Scroll down to the “Git Gateway” area, click “Enable Git Gateway” and follow the steps
92-
- Click the “Identity” tab at the top
93-
- Once you’ve enabled identity, click “Invite Users”
94-
- Check the invite link in your inbox and click the link in the email that’s sent to you
95-
- Set a password in the popup box
96-
- Go to `/admin` on your site and login
97-
- You’re in and ready to edit your content!
72+
You'll be able to create drafts and preview the final rendering before publishing.
9873

9974
## Design Tokens and Styleguide
10075

@@ -108,7 +83,7 @@ Although Hylia has a pretty simple design, you can configure the core design tok
10883

10984
---
11085

111-
To change the design tokens in the CMS, find the “Globals” in the sidebar then in the presented options, select “Theme Settings”.
86+
To change the design tokens in the CMS, click on “theme settings” in the sidebar.
11287

11388
To change the design tokens directly, edit [`_src/data/tokens.json`](https://github.com/hankchizljaw/hylia/blob/master/src/_data/tokens.json).
11489

@@ -182,7 +157,7 @@ Pass in the key of one of your breakpoints set in `$stalfos-config['breakpoints'
182157

183158
## CMS
184159

185-
Hylia has [Netlify CMS](https://www.netlifycms.org/) pre-configured as standard. You can customise the configuration by editing [`src/admin/config.yml`](https://github.com/hankchizljaw/hylia/blob/master/src/admin/config.yml).
160+
Hylia has [Forestry CMS](https://forestry.io/) pre-configured as standard. You can customise the configuration by editing [`.forestry/settings.yml`](https://github.com/DirtyF/hylia/blob/forestry/.forestry/settings.yml).
186161

187162
### Content that you can edit
188163

@@ -205,4 +180,3 @@ The stuff that I need the most help with is:
205180
- [Webmentions](https://www.w3.org/TR/webmention/)
206181
- Performance
207182

208-
[deploy-to-netlify]: https://app.netlify.com/start/deploy?repository=https://github.com/hankchizljaw/hylia&stack=cms

package-lock.json

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"semver": "^6.3.0",
1717
"slugify": "^1.4.0",
1818
"stalfos": "github:hankchizljaw/stalfos#c8971d22726326cfc04089b2da4d51eeb1ebb0eb"
19-
},
19+
},
2020
"devDependencies": {
2121
"@erquhart/rollup-plugin-node-builtins": "^2.1.5",
2222
"bl": "^3.0.0",

src/_data/tokens.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"size-scale": {
3-
"base": "1rem",
43
"300": "0.8rem",
54
"500": "1.25rem",
65
"600": "1.56rem",
76
"700": "1.95rem",
87
"800": "2.44rem",
98
"900": "3.05rem",
9+
"base": "1rem",
1010
"max": "4rem"
1111
},
1212
"colors": {

src/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metaDesc: 'Hylia is a lightweight Eleventy starter kit to help you to create you
77
socialImage: ''
88
---
99

10-
Hylia is a lightweight [Eleventy](https://11ty.io) starter kit with [Netlify CMS](https://www.netlifycms.org/) pre-configured, so that you can one-click install a progressive, accessible blog in minutes. It also gives you a well organised starting point to extend yourself. It’s by [Andy Bell](https://twitter.com/hankchizljaw) and [friends](https://github.com/aarongustafson/hylia/graphs/contributors).
10+
Hylia is a lightweight [Eleventy](https://11ty.io) starter kit with [Forestry
11+
CMS](https://forestry.io/) pre-configured, so that you can one-click install a
12+
progressive, accessible blog in minutes. It also gives you a well organised
13+
starting point to extend yourself.
1114

12-
Get started now by [deploying Hylia to Netlify.](https://app.netlify.com/start/deploy?repository=https://github.com/hankchizljaw/hylia&stack=cms)
15+
Get started now by [deploying Hylia to Netlify.](https://app.netlify.com/start/deploy?repository=https://github.com/dirtyf/hylia)

src/posts/a-post-with-code-samples.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ tags:
66
- code
77
- blog
88
---
9-
The best way to demo a code post is to display a real life post, so check out this one from [andy-bell.design](https://andy-bell.design/wrote/creating-a-full-bleed-css-utility/) about a full bleed CSS utility.
9+
10+
The best way to demo a code post is to display a real life post, so check out
11+
this one from
12+
[andy-bell.design](https://andy-bell.design/wrote/creating-a-full-bleed-css-utility/)
13+
about a full bleed CSS utility.
1014

1115
- - -
1216

@@ -49,7 +53,7 @@ The `.full-bleed` utility gives those elements prominence and _importantly_ keep
4953
}
5054
```
5155

52-
Having a container like `.wrapper` helps to create consistent, centred content.
56+
Having a container like `.wrapper` helps to create consistent, centred content.
5357

5458
- - -
5559

0 commit comments

Comments
 (0)