Revamped website for the Seattle Infinity Math Circle. The site used to be hosted at www.seattleinfinity.org. The placeholder while we get that up and running again is seattleinfinity.netlify.app.
Since this documentation is pretty incomplete, please bug William with questions and eventually he will either explain and write documentation.
If you ever run into trouble or have questions, feel free to ask William!
All site content is in /src. Things in /src/_data, /src/_includes, /src/_layouts, and /src/assets are special and don't get rendered, but everything else corresponds to a real page on the site.
For example, /src/magazine/index.njk maps to /magazine on the site, while /src/press-releases/article-1234.md maps to /press-releases/article-1234 on the site.
Just go to https://seattleinfinity.netlify.app/admin, log in, and begin editing content. There's a limited selection of files that can be uploaded at the moment.
You don't even need to download anything to make edits! Everything can be done in the browser.
- Head over to https://github.com/seattleinfinity/simc-site.
- Navigate to the file corresponding to the page you want to edit (e.g. here if you want to edit the homepage).
- Click the edit button (or press
e) and make your changes.- Note: If you're editing Markdown, you can preview your changes as you make them, but it might look a bit weird because it's actually Nunjucks. (See "Detailed Documentation" for more information.)
- Once you're done making changes, scroll to the bottom of the page and make your commit. Detailed commit message optional but encouraged.
- That's it! If you were on the
mainbranch when you went to the repository, these changes will be automatically deployed.
- Make sure you have git installed.
- Clone the repository:
git clone https://github.com/seattleinfinity/simc-site.git
- Navigate to the directory containing the file you want to edit, make your changes, and commit them.
- Push changes with
git push origin main.
Changes made on the main branch are automatically deployed to Netlify. If you want to make lots of commits but would rather update the site in one big batch, make commits on a different branch and merge when you're ready to deploy. Read about branches here.
This new site is built using the static site generator Eleventy, the templating language Nunjucks, and the CSS framework Tailwind.
William set up Decap CMS for the site in June 2023. It's all static and open source! The dynamic functionality comes from Netlify Identity and Git Gateway (two things used by Decap).
There's some custom styles and stuff in here; they all live in src/admin.
Developing locally with Decap requires:
- Run
npx netlify-cms-proxy-server - Start the Eleventy development server with
npm run dev - Go to
localhost:8080/admin(eleventy port)
- Install Node
- Install all dependencies with
npm install(or your package manager of choice) - To run the development server, use
npm run devand follow the instructions in terminal- Site should be live at
http://localhost:8080/
- Site should be live at
- To build the site, use
npm run build
Content is written in Nunjucks or Markdown. Markdown is rendered with markdown-it, and configuration options are in /.eleventy.js.
There are a lot of files and folders! I encourage you to dig around and explore, but here's a brief overview:
/_sitecontains the built site (once built) and should be ignored./.metacontains some meta utility scripts. Check out./meta/meta.mdfor more documentation./srccontains all the source code:/_datacontains data like SLG bios, navbar links, and problem of the month./_includescontains reusable components for the site./_layoutscontains layouts, sort of the inverse of components. There are already layouts in./_includes/layouts, but the ones in/_layoutsare processed by Eleventy and are simpler to use./assetsincludes static assets, including images, CSS source code and JS.- Miscellaneous files in here are probably pages.
/eleventy.jscontains configuration for Eleventy. Learn more here./tailwind.config.jsoncontains configuration for Tailwind.