Statically generated site for Redbrick
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Cian Butler 2ed040da96 Submodule (#116) 4 years ago
bin Submodule (#116) 4 years ago
lib refactor code to use routes (#113) 4 years ago
routes refactor code to use routes (#113) 4 years ago
scaffolds annouce for week 4 (#68) 5 years ago
source fix heading (#109) 4 years ago
themes Submodule (#116) 4 years ago
views add docker file 5 years ago
.dockerignore fix docker and update docs to relflect change (#107) 4 years ago
.env.example Async hexo generate API endpoint (Sort of addresses #31) (#55) 5 years ago
.gitignore Submodule (#116) 4 years ago
.gitmodules Submodule (#116) 4 years ago
.nvmrc set node version as 6.9 for production (#89) 5 years ago Spelling mistake in (#79) 5 years ago
Dockerfile fix docker and update docs to relflect change (#107) 4 years ago add contribution guide and licence 5 years ago add env to docker compose (#111) 4 years ago
_config.yml add setup script to make sure theme isnt already downloaded (#100) 5 years ago
app.js refactor code to use routes (#113) 4 years ago
circle.yml fix yaml (#96) 5 years ago
docker-compose.yml refactor code to use routes (#113) 4 years ago
package.json Submodule (#116) 4 years ago
website.service add circle deployment script (#92) 5 years ago
yarn.lock Submodule (#116) 4 years ago



A Static Site for redbrick generated with hexo using a theme based off icarus


  1. Node : v6.9(LTS) Download Node


To set up run:

  • yarn this will install all the dependencies

You will also need to create three files:

  • mailing_list a newline-separated list of email addresses
  • email_update_log a newline-separated reverse-chronological list of times email updates were sent
  • .env by copying .env.example and modifying values (important)

mailing_list and email_update_log can be left blank, though updates for every post in history will be sent if no previous send date is specified.


  • To demo the site run npm start. This will create a server that runs on localhost:3000
  • To work on css and have it auto regenerate use yarn hexo. This will create a server that runs on localhost:4000

Generate via API

  • While the server is live, a visit to http://[sitehost]/api/regenerate?token=your_secret_token will run hexo generate and send emails for any new posts so long as that process is not already underway.


  • To generate new posts
    • Run yarn posts [title] This will create a new post in source/_post/[title].md
  • To generate new pages:
    • Run yarn page [title] this will create a new page in source/[title]/
  • To edit the sidebar:
    • Edit themes/redbrick-theme/_config.yaml - this is where all the theme configuration is controlled from.

CSS and Templates

  • You can edit the css for the theme in themes/redbrick-theme/source/css
  • You can edit the templates in themes/redbrick-theme/layout

Google analytics

Analytics can be enabled by adding your analytics key to theme/redbrick/_config.yaml


To deploy to a server run:

  • yarn
  • modify _config.yml with mailhost info
  • yarn start

Then using apache or nginx proxy traffic to port 3000. And done. You can create a service to run the server on startup if you want refer to express docs and using a service for this


There is a docker file if you want to generate a container that runs in production mode.

  • To build just run docker build . -t redbrick/site
  • Then to start just run docker run -it --rm -p=3000:3000 -v source:/usr/src/app/source --name redbrick-site redbrick/site
  • Source volume needs to be specified otherwise it wont have anything to generate Or Just run docker-compose up