You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
6
-
7
-
Get started now by **[deploying Hylia to Netlify.][deploy-to-netlify]**
8
-
9
-
[][deploy-to-netlify]
10
-
11
-
12
-
13
-
## Features
14
-
15
-
Hylia version 0.5.1 features:
16
-
17
-
✍️ A pre-configured [Netlify CMS](https://www.netlifycms.org/) setup
18
-
🎨 Customisable design tokens to make it your own
19
-
🌍 Customisable global data and navigation
20
-
📂 Tags and tag archives
21
-
✅ Progressively enhanced, semantic and accessible
22
-
🎈 _Super_ lightweight front-end
23
-
🚰 Sass powered CSS system with utility class generator
24
-
⚙️ Service worker that caches pages so people can read your articles offline
💡 ~~Dark/Light mode toggle~~[Added in 0.4.0](https://github.com/hankchizljaw/hylia/releases/tag/0.4.0)
31
-
🗣 Webmentions
32
-
📖 Pagination
33
-
🐦 Web sharing API integration
34
-
🗒 Offline mode with links to cached pages
35
-
📄 Documentation site
36
-
💅 Proper Sass documentation
37
-
✍️ Proper CMS documentation
38
-
🖼 A facility for you to be able to add your logo / branding
3
+
This is the website for patternlab.io. This site was build using the [Hylia starter kit](https://hylia.website/), which is a lightweight [Eleventy](https://11ty.io) starter kit.
39
4
40
5
---
41
6
42
-
## Getting started
7
+
## How to work with this project
43
8
44
-
### Method one: One-Click Deploy to Netlify
45
-
46
-
You can [deploy Hylia to Netlify with one click][deploy-to-netlify] and you’ll be up and running in minutes!
47
-
48
-
[][deploy-to-netlify]
49
-
50
-
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).
51
-
52
-
### Method two: Clone / Fork
53
-
54
-
1. Clone or fork this repo: `git clone https://github.com/hankchizljaw/hylia`
9
+
1. Clone this repository
55
10
2.`cd` into the project directory and run `npm install`
56
11
3. Once all the dependencies are installed run `npm start`
57
-
4. Open your browser at `http://localhost:8080` and away you go!
12
+
4. Open your browser at `http://localhost:8080`
58
13
59
14
## Terminal commands
60
15
@@ -75,135 +30,3 @@ npm run production
75
30
```bash
76
31
npm run sass:process
77
32
```
78
-
79
-
### Re-generate design tokens for Sass
80
-
81
-
```bash
82
-
npm run sass:tokens
83
-
```
84
-
85
-
## Getting started with the CMS
86
-
87
-
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/).
88
-
89
-
In short, though:
90
-
91
-
- Once you’ve set up the site on Netlify, go to “Settings” > “Identity” and enable Identity
92
-
- Scroll down to the “Git Gateway” area, click “Enable Git Gateway” and follow the steps
93
-
- Click the “Identity” tab at the top
94
-
- Once you’ve enabled identity, click “Invite Users”
95
-
- Check the invite link in your inbox and click the link in the email that’s sent to you
96
-
- Set a password in the popup box
97
-
- Go to `/admin` on your site and login
98
-
- You’re in and ready to edit your content!
99
-
100
-
## Design Tokens and Styleguide
101
-
102
-
### Design Tokens
103
-
104
-
Although Hylia has a pretty simple design, you can configure the core design tokens that control the colours, size ratio and fonts.
105
-
106
-
---
107
-
108
-
**Note**: _Credit must be given to the hard work [Jina Anne](https://twitter.com/jina) did in order for the concept of design tokens to even exist. You should watch [this video](https://www.youtube.com/watch?v=wDBEc3dJJV8), then [read this article](https://the-pastry-box-project.net/jina-bolton/2015-march-28) and then sign up for [this course](https://aycl.uie.com/virtual_seminars/design_tokens_scaling_design_with_a_single_source_of_truth) to expand your knowledge._
109
-
110
-
---
111
-
112
-
To change the design tokens in the CMS, find the “Globals” in the sidebar then in the presented options, select “Theme Settings”.
113
-
114
-
To change the design tokens directly, edit [`_src/data/tokens.json`](https://github.com/hankchizljaw/hylia/blob/master/src/_data/tokens.json).
115
-
116
-
The tokens are converted into maps that the Sass uses to compile the front-end CSS, so make sure that you maintain the correct structure of `tokens.json`.
117
-
118
-
### Styleguide
119
-
120
-
Your version of Hylia ships with a Styleguide by default. You can see a demo of the Styleguide at <https://hylia.website/styleguide/>.
121
-
122
-
You can edit the Styleguide by opening [`src/styleguide.njk`](https://github.com/hankchizljaw/hylia/blob/master/src/styleguide.njk). If you don’t want the Styleguide, delete that file and the page will vanish.
123
-
124
-
## Sass
125
-
126
-
Hylia is based on the [WIP v2 version of Stalfos](https://github.com/hankchizljaw/stalfos/tree/feature/v2), which currently has no documentation (I know, I’m bad). Here is some very basic documentation for elements of the new framework that you will encounter on this project.
127
-
128
-
### Configuration
129
-
130
-
The whole Sass system is powered by central config file, which lives here: [`_src/scss/_config.scss`](https://github.com/hankchizljaw/hylia/blob/master/src/scss/_config.scss).
131
-
132
-
Before Sass is compiled, a `_tokens.scss` file is generated from the [design tokens config](https://github.com/hankchizljaw/hylia/blob/master/src/_data/tokens.json) which is required.
133
-
134
-
Key elements:
135
-
136
-
-`$stalfos-size-scale`: A token driven size scale which by default, is a “Major Third” scale
137
-
-`$stalfos-colors`: A token driven map of colours
138
-
-`$stalfos-util-prefix`: All pre-built, framework utilities will have this prefix. Example: the wrapper utility is '.sf-wrapper' because the default prefix is 'sf-'
139
-
-`$metrics`: Various misc metrics to use around the site
140
-
-`$stalfos-config`: This powers everything from utility class generation to breakpoints to enabling/disabling pre-built components/utilities
141
-
142
-
### How to create a new utility class with the generator
143
-
144
-
The utility class generator lets you generate whatever you want, with no opinions on class name or properties affected.
145
-
146
-
To add a new class, add another item to the exists `$stalfos-config` map. This example adds a utility for floating elements.
147
-
148
-
```scss
149
-
'float':('items':('left':'left','right': 'right'
150
-
),
151
-
'output': 'responsive',
152
-
'property': 'float'
153
-
);
154
-
```
155
-
156
-
The `output` is set to `responsive` which means every breakpoint will generate a prefixed class for itself. If you only wanted elements to float left in the `md` breakpoint, you’d now be able to add a class of `md:float-left` to your HTML elements.
157
-
158
-
If you only want standard utility classes generating, set the `output` to `standard`.
159
-
160
-
### Functions
161
-
162
-
#### `get-color($key)`
163
-
164
-
Function tries to match the passed `$key` with the `$stalfos-colors` map. Returns null if it can’t find a match.
165
-
166
-
#### `get-config-value($key, $group)`
167
-
168
-
Returns back a 1 dimensional (key value pair) config value if available.
169
-
170
-
#### `get-size($ratio-key)`
171
-
172
-
Function tries to match the passed `$ratio-key` with the `$stalfos-size-scale`. Returns null if it can’t find a match.
173
-
174
-
### Mixins
175
-
176
-
#### `apply-utility($key, $value-key)`
177
-
178
-
Grabs the property and value of one of the `$stalfos-config utilities` that the generator will generate a class for.
179
-
180
-
#### `media-query($key)`
181
-
182
-
Pass in the key of one of your breakpoints set in `$stalfos-config['breakpoints']` and this mixin will generate the `@media` query with your configured value.
183
-
184
-
## CMS
185
-
186
-
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).
187
-
188
-
### Content that you can edit
189
-
190
-
The basic CMS setup allows you to edit the following:
191
-
192
-
-**Home page**: Edit the content on your homepage
193
-
-**Posts**: Create and edit blog posts
194
-
-**Generic pages**: Create generic pages that use a similar layout to posts
195
-
-**Global site data**: Various bits of global site data such as your url, title, posts per page and author details
196
-
-**Navigation**: Edit your primary navigation items
197
-
-**Theme**: Edit the design tokens that power the site’s theme
198
-
199
-
## Get involved
200
-
201
-
This project is _super_ early and feedback is very much welcome. In order to keep things running smooth, please consult the [contribution guide and code of conduct](https://github.com/hankchizljaw/hylia/blob/master/contributing.md).
0 commit comments