Tools we use
- 11ty static site generator
- Silex website builder
- forestry headless CMS
- snipcart e-commerce
- github pages and github actions
todo
- BASE_URL should start with a
/
- config editable.html with 11ty
- remove
_includes/tags.liquid
because it can be done withcollection
- responsive images
In this repo I have setup by default
- 11ty
- Forestry
- Silex
These plugins are preconfigured:
Here are the available collections:
collections.page
which take the content ofcontent/pages
collections.post
which take the content ofcontent/posts
collections.product
which take the content ofcontent/products
collections.categories
which is an array of all the categories found in all your posts and pages and products (e.g. the categories in this post)
Here are the available includes:
collection
: display a list of links, to posts, categories or other collection, this will be useful for navigation and tag cloud, see the comment herepagination
: to be documentedslideshow
: insert a slideshow which shows the images of theimages
key in the page front matter, see the comment hereimage
: display an image, see the comment heretags
: insert a list of page/post/product filtered by category, see the comment here
Import this repo in forestry and you will be able to edit pages, posts and products
This repository is a template you can use to create a site with 11ty and Silex website builder
It conains an action to deploy on github pages automatically
Here is how to start:
- Fork this repository or click "use this template" (/!\ be sure to select "Include all branches")
- Create a deploy token here with the access write
public_repo
- In the settings of the website, "secret" section, create a new secret, call it
DEPLOY_TOKEN
and paste the token as its value - In the settings of the website, "secret" section, create a new secret, call it
BASE_URL
and set its value to the name of your repository prepended with a/
(e.g./11ty-boilerplate
) - Create a website with Stastic designer
- Publish your site from Stastic designer to github as 11ty layout
- Create a file like test.md, add
layout: YOUR PAGE NAME IN STASTIC
Check the minimum version of node in .nvmrc or use nvm i
$ npm i
$ npm run build
Useful env vars on the build server
URL
optional website URLBASE_URL
optional base url, when defined it should start with a/
DEPLOY_TOKEN
for deployment to branchgh-pages
Use the "stastic" fork of Silex which contains the 11ty components by default
Links:
- stastic latest version is available online here
- stastic source code
- Silex documentation
- Silex forums to ask for help
In case the latest version will not work as expected, the version of stastic used for this website is v2.7.13 which can be downloaded here. There is a downloadable app to work offline with your local files, or you can host it somewhere (nodejs) to work with github files.