• This repository has been archived on 16/Oct/2021
  • Stars
    star
    906
  • Rank 50,411 (Top 1.0 %)
  • Language Nunjucks
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hylia is a lightweight Eleventy starter kit to help you to create your own blog or personal website.

A simple starter kit for Eleventy

Hylia is a lightweight Eleventy starter kit with Netlify CMS 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.

Get started now by deploying Hylia to Netlify.

Deploy to Netlify

Features

Hylia version 0.7.0 features:

✍️ A pre-configured Netlify CMS setup
🎨 Customisable design tokens to make it your own
🌍 Customisable global data and navigation
πŸ“‚ Tags and tag archives
βœ… Progressively enhanced, semantic and accessible
🎈 Super lightweight front-end
🚰 Sass powered CSS system with utility class generator
βš™οΈ Service worker that caches pages so people can read your articles offline
πŸš€ An RSS feed for your posts
πŸ’Œ A basic contact form, ready for Netlify Forms

Roadmap

πŸ’¬ Netlify Forms powered comments
πŸ’‘ Dark/Light mode toggle Added in 0.4.0
πŸ—£ Webmentions
πŸ“– Pagination
🐦 Web sharing API integration
πŸ—’ Offline mode with links to cached pages
πŸ“„ Documentation site
πŸ’… Proper Sass documentation
✍️ Proper CMS documentation
πŸ–Ό A facility for you to be able to add your logo / branding


Getting started

Method one: One-Click Deploy to Netlify

You can deploy Hylia to Netlify with one click and you’ll be up and running in minutes!

Deploy to Netlify

I recorded a quick start video of me deploying Hylia to Netlify and getting the CMS set up. Check it out here.

Method two: Clone / Fork

  1. Clone or fork this repo: git clone https://github.com/hankchizljaw/hylia
  2. cd into the project directory and run npm install
  3. Once all the dependencies are installed run npm start
  4. Open your browser at http://localhost:8080 and away you go!

Terminal commands

Serve the site locally

npm start

Build a production version of the site

npm run production

Compile Sass

npm run sass:process

Re-generate design tokens for Sass

npm run sass:tokens

Getting started with the CMS

Before you can use the CMS, you need to do some config in Netlify. Luckily they provide a very handy guide to get started.

In short, though:

  • Once you’ve set up the site on Netlify, go to β€œSettings” > β€œIdentity” and enable Identity
  • Scroll down to the β€œGit Gateway” area, click β€œEnable Git Gateway” and follow the steps
  • Click the β€œIdentity” tab at the top
  • Once you’ve enabled identity, click β€œInvite Users”
  • Check the invite link in your inbox and click the link in the email that’s sent to you
  • Set a password in the popup box
  • Go to /admin on your site and login
  • You’re in and ready to edit your content!

Design Tokens and Styleguide

Design Tokens

Although Hylia has a pretty simple design, you can configure the core design tokens that control the colours, size ratio and fonts.


Note: Credit must be given to the hard work Jina Anne did in order for the concept of design tokens to even exist. You should watch this video, then read this article and then sign up for this course to expand your knowledge.


To change the design tokens in the CMS, find the β€œGlobals” in the sidebar then in the presented options, select β€œTheme Settings”.

To change the design tokens directly, edit _src/data/tokens.json.

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.

Styleguide

Your version of Hylia ships with a Styleguide by default. You can see a demo of the Styleguide at https://hylia.website/styleguide/.

You can edit the Styleguide by opening src/styleguide.njk. If you don’t want the Styleguide, delete that file and the page will vanish.

Sass

Hylia is based on the WIP v2 version of Stalfos, 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.

Configuration

The whole Sass system is powered by central config file, which lives here: _src/scss/_config.scss.

Before Sass is compiled, a _tokens.scss file is generated from the design tokens config which is required.

Key elements:

  • $stalfos-size-scale: A token driven size scale which by default, is a β€œMajor Third” scale
  • $stalfos-colors: A token driven map of colours
  • $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-'
  • $metrics: Various misc metrics to use around the site
  • $stalfos-config: This powers everything from utility class generation to breakpoints to enabling/disabling pre-built components/utilities

How to create a new utility class with the generator

The utility class generator lets you generate whatever you want, with no opinions on class name or properties affected.

To add a new class, add another item to the exists $stalfos-config map. This example adds a utility for floating elements.

'float':('items':('left':'left','right': 'right'
  ),
  'output': 'responsive',
  'property': 'float'
);

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.

If you only want standard utility classes generating, set the output to standard.

Functions

get-color($key)

Function tries to match the passed $key with the $stalfos-colors map. Returns null if it can’t find a match.

get-config-value($key, $group)

Returns back a 1 dimensional (key value pair) config value if available.

get-size($ratio-key)

Function tries to match the passed $ratio-key with the $stalfos-size-scale. Returns null if it can’t find a match.

Mixins

apply-utility($key, $value-key)

Grabs the property and value of one of the $stalfos-config utilities that the generator will generate a class for.

media-query($key)

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.

CMS

Hylia has Netlify CMS pre-configured as standard. You can customise the configuration by editing src/admin/config.yml.

Content that you can edit

The basic CMS setup allows you to edit the following:

  • Home page: Edit the content on your homepage
  • Posts: Create and edit blog posts
  • Generic pages: Create generic pages that use a similar layout to posts
  • Global site data: Various bits of global site data such as your url, title, posts per page and author details
  • Navigation: Edit your primary navigation items
  • Theme: Edit the design tokens that power the site’s theme

Get involved

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.

The stuff that I need the most help with is:

More Repositories

1

modern-css-reset

A bare-bones CSS reset for modern web development.
CSS
2,949
star
2

boilerform

Boilerform is a little HTML and CSS boilerplate to take the pain away from working with forms.
CSS
713
star
3

vanilla-js-state-management

A state management system built with vanilla JavaScript with a little demo included
JavaScript
461
star
4

gorko

A tiny Sass token class generator.
SCSS
442
star
5

beedle

A tiny library inspired by Redux & Vuex to help you manage state in your JavaScript apps
JavaScript
386
star
6

goron

A simple design token utility class generator
JavaScript
129
star
7

learneleventyfromscratch.com

In this Eleventy course, we go from a completely empty directory to a full-blown marketing site for a design agency, and along the way, we dive really deep into Eleventy and front-end development best practices.
121
star
8

mybrowser.fyi-project

Where the roadmap and issue tracker for https://mybrowser.fyi live
94
star
9

CUBE-with-tailwind

CSS
91
star
10

11ty-base

Eleventy base project
Nunjucks
87
star
11

npm-uninstall-facebook

CSS
85
star
12

hebra

Hebra is a skeletal Eleventy starter kit that gives you nothing but good ol’ HTML and an RSS feed. It serves as the ideal kick-off point for your projects.
HTML
55
star
13

personal-site-eleventy

My site on Eleventy, powered by WordPress and Notion
JavaScript
54
star
14

some-nice-basic-css

HTML
49
star
15

vanilla-js-state-management-boilerplate

The boilerplate to help you build the vanilla state management system
CSS
43
star
16

tatl

A tiny base component to guide you to a consistent Web Component authoring experience
JavaScript
33
star
17

typemate

A little JavaScript module that fixes your typesetting
JavaScript
31
star
18

stalfos

A skeletal collection of Sass helpers with a handy CSS utility class generator.
JavaScript
31
star
19

companies-that-work-with-ice

This is an open source list that you can contribute to
CSS
31
star
20

11ty-base-no-blog

SCSS
28
star
21

educationlinks.fyi

The Coronavirus Pandemic has resulted in school closures in many countries around the globe, so here is a collection of links to help you and your kids to access loads of resources from around the web.
CSS
28
star
22

personal-site-hylia

My personal site, running on Hylia!
HTML
25
star
23

minimal-react-base

This is a little starting point for if you want to sling some React on a HTML page with some CSS.
JavaScript
22
star
24

11ty-pattern-library

Nunjucks
18
star
25

soot-theme

A VS Code theme that's nice and greyscale
13
star
26

progressive-vue-toggle

A demo of how Vue's scoped slots can be handy for progressive enhancement
HTML
8
star
27

webcomponents.club

My little blog about learning web components
HTML
5
star
28

gorko-themes-demo

SCSS
4
star
29

hylia-preview

HTML
4
star
30

chizlvim

My Vim settings
Vim Script
4
star
31

thanksforthereply.com

A fun little web app to thank reply guys
JavaScript
3
star
32

post-helper

A little helper PWA that makes posting notes to my microblog easier
HTML
3
star
33

time.hankchizljaw.com

CSS
3
star
34

2018-goals

My goals for 2018 in a repo for accountability and for me to keep a log of what I've achieved
3
star
35

beedle-vue-demo

A little demo to show how you can use Beedle with Vue JS without a connector
Vue
2
star
36

vim-jsdoc

Vim Script
2
star
37

belkirk-jekyll-demo

HTML
2
star
38

magical-kicks

HTML
2
star
39

CT4009-php-and-mysql

A basic comment form that saves and retrieves data from a MySQL DB
PHP
1
star
40

2019-goals

Goals that I want to acheive in 2019
1
star
41

11ty-js-template-quick-example

JavaScript
1
star
42

weekly-todos

HTML
1
star
43

demos

A little repo to house demos for content on https://piccalil.li/
CSS
1
star
44

base-front-end-project

A useful front-end base project. A little SCSS framework is included along with a mini jQuery starting point. A HTML5 boilerplate is added for good measure too.
CSS
1
star
45

stalfos.io

The Stalfos documentation website
JavaScript
1
star
46

CT4009-sessions-and-cookies

PHP
1
star
47

gorko-custom-props-demo

A little demo to show Gorko using custom properties
SCSS
1
star