A site dedicated to helping web designers learn to code. Compiled by the people of Upstatement. Built with Eleventy
Forked from Eleventy Base Blog (Eleventy Docs)
This project uses nvm
and npm
.
-
Install dependencies
nvm install && npm install
-
Clone the
.env
to.env.development
cp .env.example .env.development
-
Build and host locally for local development (with hot-reload)
npm start
Or in debug mode:
npm run debug
Or build the site into
_site
:npm run build
You can teach about whatever you like. We ask that you keep your scope moderate and entries digestable. We don’t prescribe a voice or homogeny throughout the Library, so embrace your style and allow your own understanding to direct the lesson.
- Scaffold your lesson. Doing so will make it easier to follow and retain.
- Attend theory, principals, and best-practices when they present themselves. You don’t need to go into detail — just acknowledge them and their relevance to the lesson. A contrived example would be:
We’ll extract this operation into a function so that we don’t need to repeat our code each time we use it with different parameters.
- If your lesson has knowledge prerequisites not captured in the Library, please add an epigraph with references to where it can be attained (somewhere like MDN is ideal). Or, if you're up for it, consider making a feature request for the missing information, or adding it yourself :)
- If your lesson is paired with visuals or functional examples, please include them.
In your terminal, run the following command and follow the prompts.
npm run temples
Note: name
should be readable English while filename
should be slugified
There is a script
that runs on pre-commit
called last_modified
(found in the /scripts
directory). This updates any files that you have edited to have their last modified
date set to today. These changes are not added to your existing commit, and should be committed separately as a chore: update last modified dates
commit.
Our API is composed of static JSON files created as part of our build process. These can be accessed at the /api/*
path.
Since they are just static JSON files, running the site locally requires the .json
file extension to be added to the end of your path.
To get around this limitation, we are using Netlify's _redirects
file to rewrite the URLs to remove the extension.
If you'd like to see this behavior locally, you can install the Netlify CLI and run the start:netlify
command from the root directory.
npm run start:netlify
.
├── src # Most of the site lives in here
│ ├── _11ty # Where some collections are created (pulled into the eleventy config)
│ ├── _data # Site data lives here, where external data can be pulled in
│ ├── _includes # Template layouts & partials
│ ├── api # We can add JSON endpoints here
│ ├── assets # SCSS and JS
│ ├── collections # Non-serialized, topically related groups entries
│ ├── entries # All entries (markdown files)
│ ├── pages # Pages of the site
│ ├── series # Serialized groups of entries that build toward a specific outome
│ └── static # Fonts and images
├── .eleventy.js # Eleventy config
└── package.json # You know what it is