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.liquidbecause 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.pagewhich take the content ofcontent/pagescollections.postwhich take the content ofcontent/postscollections.productwhich take the content ofcontent/productscollections.categorieswhich 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 theimageskey 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_TOKENand paste the token as its value - In the settings of the website, "secret" section, create a new secret, call it
BASE_URLand 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
URLoptional website URLBASE_URLoptional base url, when defined it should start with a/DEPLOY_TOKENfor 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.