This repository contains the source code for Norfolk.js's user group website. We strongly encourage everyone to contribute as much or little as they wish. Not a developer? We can use documentation and design help as well!
This website is built using handlebars and some custom js to build a static website. This site is hosted using GitHub Pages on Github.
Check out the open bugs and enhancements.
- Fork this repository. How?
- Clone your fork. How?
- Start coding.
- Push your code to your fork. How?
- Add your name to the people.txt.
- Issue a pull request to norfolkjs.github.io. How?
npm install -g http-server nodemon
npm install
npm run dev
Development mode serves the site on the fly, generating pages on the fly.
Then, you can access the site locally by going to https://localhost:4000 in your web browser.
npm run build
Builds a static copy of the site in the build directory.
npm run deploy
TODO: Run this in a github action when a PR is merged.
The repo has four folders:
Contains static files. e.g. images, js, css, etc. Assets in this directory will be served at root path / during dev, and copied to the root of the build directory as-is.
Contains the handlebars.js templates.
Contains the server side javascript that builds the website and runs the site in dev mode.
Contains the files for which pages are built from. The directory structure in this folder directly results in the site structure. Can include the html, handlebars.js templates, markdown, or txt files.
For example:
Content File Path | Browser URL Path | Static File Path Builds |
---|---|---|
index.html |
/ |
/index.html |
blog/index.html |
/blog |
/blog/index.html |
blog/post-title.md |
/blog/post-title |
/blog/post-title/index.html |
about/index.html |
/about |
/about/index.html |
about/people.txt |
/about/people |
/about/people/index.html |
Content files may optionally contain a meta header. Started with jekyllrb with some customizations.
---
template: post
title: Norfolk.js meetup kickoff
tags: javascript, meetup, norfolk
published: true
excerpt: The kickoff meetup for the Norfolk.js group.
---
The only properties that the site builder uses are the title
property and the template
property. The title
property sets the document title. If the template
prop isn't set the default template is used. All the values in the header can be used in the handlebars templates.