welcome! Unlock NYC builds digital tools to make the apartment search process transparent, fair, and free from discrimination for all New Yorkers.
🤖🏡 This project hosts our main website.
-
front-end/CMS: we use Forestry to edit content in Markdown files. Any changes in Forestry are automatically committed to this repo.
-
deployment/hosting: we use Netlify to serve the website over the net - it's automatically set up to trigger a build whenever anything in this repo changes.
-
static site generator: this site is built with 11ty!
-
staging/back-end edits: we use Glitch to make edits, preview and share them, and then export them to this repo.
-
functions: we use Netlify functions to authenticate advocates who have logins and are reporting on behalf of others
-
in the
_includes
folder, you'll find all the site's template files, written in Liquid. When 11ty runs, it uses these files to generate HTML pages and stores them in a folder calledbuild.
You won't see thebuild
folder in this repo! It's generated every time 11ty runs, and hidden via the.gitignore
file. -
the rest of the
.md
files are the content, either pulled from various places (for example, thebios
folder holds content that gets displayed on the About page, via theabout.liquid
template) or simply from the root folder. 11ty takes any Markdown file and turns it into a folder with a correspondingindex.html
. For example,press.md
turns into a folder (/press
) with an index (/press/index.html
) inside it, so that the URLhttps://weunlock.nyc/press
works. -
the
styles
folder holdssite.css
- other css files are inside the_includes
folder, so that they can be pulled onto specific pages via Liquid templates. When they are pulled via template files, the css files are minified. -
the
scripts
folder holds any site-wide javascript -
.eleventy.js
is the 11ty configuration file - it sets the output folder tobuild
, and allows for thestyles
andscripts
folders to be bundled into the output folder too so we can use them.
-
you can Remix this project in Glitch, to create your own
dev
environment to play with. This will install everything frompackage.json
, all dependencies and configurations, etc. When you make a change in Glitch, it automatically runs 11ty and generates the static site on the Glitch URL only. -
alternatively, you can use https://unlock-nyc-web.glitch.me as a staging environment - as long as you use branches in case multiple Unlock people are working on it at once!
-
before working in Glitch, make sure the project is up-to-date with the Github repo first!! This is important - Forestry writes content and Markdown edits to the Github repo automatically, but this does not sync with the Glitch project. You need to find the Tools menu in the lower left, choose "Import and Export," and then "Import from Github."
-
when you are ready to push changes to the website, choose the Tools menu again, and this time "Export to Github." This will create a branch called
glitch
in the Github repo, and you can create a pull request to double-check your changes before merging with themain
production branch. You should delete theglitch
branch when you are finished. -
once you merge to
main
, the changes are deployed automatically via Netlify. You can check the Netlify dashboard to follow the status of the deploy/build.
-
Forestry documentation - for configuring the CMS
-
11ty documentation - there's so much here, if you go digging!
🛠 feel free to add to this list!