thing for me to test DecapCMS
Go to file
2021-06-28 15:26:02 -04:00
.github/ISSUE_TEMPLATE Delete compress.yml 2020-03-31 20:11:19 -04:00
.vscode reinstated .gitignore 2019-01-04 15:49:16 -05:00
_site modified template to include update js files for bootstrap 2020-01-31 21:11:21 -05:00
build modified template to include update js files for bootstrap 2020-01-31 21:11:21 -05:00
.babelrc compression, but in the wrong place 2019-03-14 18:32:33 -04:00
.eleventy.js updates for new version 2020-01-30 20:35:56 -05:00
.gitignore re-added build to gitignore on master branch. Left it on for branch 2019-03-29 01:14:03 -04:00
.nowignore attempting to revert to working build process 2019-02-19 19:51:09 -05:00
CNAME Create CNAME 2019-03-28 20:16:19 -04:00 changes for v9 2020-01-17 17:05:43 -05:00
LICENSE cleanup files 2018-12-29 18:48:48 -06:00
now.json fixed issue with now.json file for deployment 2019-02-19 20:10:55 -05:00
package-lock.json Bump prismjs from 1.19.0 to 1.24.0 2021-06-28 18:46:02 +00:00
package.json modified template to include update js files for bootstrap 2020-01-31 21:11:21 -05:00 Update 2019-10-08 19:32:42 -04:00
webpack.common.js fixed issues and spacing on dropdowns, moved items inside the _templates folder for auto reloading 2019-03-20 21:09:47 -04:00 mofidied files and templates, deleted old webpack config files 2019-03-20 17:06:12 -04:00 Improvements to header and spacing 2019-03-21 21:06:33 -04:00


This project is a template for building sites using the Eleventy static site generator. You can see a demo of the site at It features a Vue.js powered simple search based on what's in _site/posts and _site/courses as well as pagination, animations and much more.


  • Clone or download the repo
  • Run npm install to install dependencies
  • Run npm start to start the development server.
  • Point your browser to localhost:8080
  • Edit posts in the _site/posts or _site/courses folder.
  • Run npm run build to build the project.


All the files that require pre-processing are inside the _templates/_process folder.

The main sass doument is the style.scss document, which has a number of imports including fonts. This also imports bootstrap, but notice several unused bootstrap components have been commented out to make the file size smaller. Feel free to uncomment these if you're going to be using them in your layout.

_custom.scss lets you override sass variables so you can customize the way different components work. This new version of seven uses a dark mode color scheme by default, but it's fairly easy to update using this custom file.

All of the overrides for specific styles are in the _overrides.scss file, so look there to change the way specific classes work.


The js folder has a single script.js file. There are two parts, a jquery section that is designed to change the way Bootstrap's jquery components work and a vue.js instance that powers the search.

In this version, I'm using script tags to the CDNs for things like the Bootstrap Javascript, the fonts, etc. I wasn't changing any of the bootstrap or other library javascript so I think this will be much more performant since most people will have the CDNs pre-loaded in their browsers.


The main 11.ty site files are all in the _site folder.

The _site folder is pretty much like your website root folder. These files will convert to pages for the most part. It's useful to think of it as having the structure your site folder will have (notice there are index, css, image files like on your site), but don't be fooled, most of the files in this folder need to be processed.

The _templates folder has a series of templates used to build your site, no content here. Most of these are self explanatory and you'll see these being called in your pages. There is a _layouts folder that has the main layouts. You should probably look at the 11.ty documentation to learn how these work. Of course, I've added the _templates folder in here because it helps with the reloading of elements during development.

There is a special getTagsList.js folder which sets up your tags, It's used by the main configuration file called .eleventy.js. I didn't know where else to put it so it seemed like a good idea to me.

_data folder

This has the metadata.json file, which includes variables that the site uses to build itself. Things like name, bio, the title of the site. For example, you can access the title of the site using {{metadata.title}} in your template.

There is also a myProject.js file. The purpose of this file is to expose the value of the environment variable's setting (development or production) so you can use it in templates like this:

{% if myProject.environment == "development" %}
<script src=""></script>
{% else %}
<script src=""></script>
{% endif %}

I use this to load the development version of vue.js during development and the smaller distribution version when building the project.


The main configuration file is called .eleventy.js and is in the root folder. The important bits are the special collections based on existing folders.

// only content in the `posts/` directory
eleventyConfig.addCollection("courses", function(collection) {
  return collection.getFilteredByGlob("./_site/courses/*.md").reverse();

eleventyConfig.addCollection("searchable", function(collection) {
  return collection
    .getFilteredByGlob(["./_site/courses/*.md", "./_site/posts/*.md"])

These commands set up collections, which are used to build the site. The first example corresponds to folders in the _site folder that are the main sections of the site. The commands here will look for a certain folder in the _sites folder and build a collection out of everything in there.

The last one adds folders to a new collection which our Vue.js search component uses. If you add a new collection, make sure you add it here. Check the 11.ty documentation to learn how to use the getFilteredByGlob command.


This code is used to copy whatever is in these folders, if you happen to move the locations of images, then update this.

I hate messy root folders, so I've reconfigured where eleventy places files.

dir: {
  input: "_site",
  includes: "_templates",
  data: "_data",
  output: "dist"

If you move stuff around, remember to update these. Also, the build processes refer to some of these locations, so if you move things, remember to update these.

    "start": "npm-run-all --parallel dev:*",
    "dev:del": "rimraf dist",
    "dev:eleventy": "ELEVENTY_ENV=development eleventy --serve --quiet",
    "dev:webpack": "webpack --config",

    "build": "run-s prod:*",
    "now-build": "run-s prod:*",
    "prod:del": "rimraf build",
    "prod:webpack": "webpack -p --config",
    "prod:serve": "ELEVENTY_ENV=production eleventy --output=./build"


I have two main processes that can run. There is a shared configuration file called webpack.common.js and two other configuration for development or production environments.

npm start

This cleans up the dist or build folders, then runs eleventy and webpack. Webpack takes care of processing the sass and javascript.

npm run build

This cleans up/creates a new build folder, then runs the eleventy and webpack. Webpack takes care of processing the sass and javascript. The webpack processes are in

There is an optional now-build process here as well that runs if you are using

Other Setup Files

  • now.json - Configuration for now, if you use

  • .nowignore - Thing that now ignores

  • .babelrc - configures how webpack processes javascript to make it more or less compatible with older browser versions.