Skip to content

UnlockNYC/unlock-nyc-web

Repository files navigation

unlock nyc logo

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.


platforms

  • front-end/CMS: we use Tina to edit content in Markdown files. Any changes in Tina 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!

  • images/content CDN: we use Digital Ocean Spaces as object storage.

  • functions: we use Netlify functions to authenticate advocates who have logins and are reporting on behalf of others, and to connect the Tina CMS Media Manager to Digital Ocean.

project structure

  • in the_includes folder, you'll find all the site's template files, written in Nunjucks. When 11ty runs, it uses these files to generate HTML pages and stores them in a folder called build. You won't see the build folder in this repo! It's generated every time 11ty runs, and hidden via the .gitignore file.

  • the rest of the .md files hold the content and metadata, either pulled from various places (for example, the bios collection holds content that gets displayed on the About page, via the about.njk template) or simply from the root folder. 11ty takes any Markdown file and turns it into a folder with a corresponding index.html. For example, press.md turns into a folder (/press) with an index (/press/index.html) inside it, so that the URL https://weunlock.nyc/press works.

  • the public/styles folder holds site.css - other css files are inside the _includes folder, so that they can be pulled onto specific pages via Nunjuck templates.

  • .eleventy.js is the 11ty configuration file - it sets the output folder to build, and allows for the styles and scripts folders to be bundled into the output folder too so we can use them.

  • tina/config.ts is the Tina configuration file, for building out the schema of the CMS.

installation & contributing

  • to work on the site locally, download the code and in the root folder run:

    npm install
    npx tinacms dev -c "npx @11ty/eleventy --serve"
    

    This should give you both Tina CMS and the 11ty site on a localhost.

  • remember to run git pull before trying to push code to a new branch on the github!

  • also remember, any push to the main branch on the github will trigger a Netlify deploy and change the site. to preview first, upload to another branch and make a pull request.

  • note: the deploy previews & checks in Github rarely pass, even when the project builds locally and in Netlify

  • having issues with TinaCMS build? check out their Discord, it can be helpful!

  • another troubleshooting tip: if all else fails, try "reindexing" main from within TinaCloud (🦙)

documentation you might want to read

fun tools you might need

🛠 feel free to add to this list!

🤖✊thanks!

About

this is the website for unlock nyc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •