Statically generated site for Redbrick https://www.redbrick.dcu.ie
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 3b10c025f5 add docker file 5 years ago
bin add logs 5 years ago
scaffolds add images to posts 5 years ago
source add reletive links to pdf for tutorials 5 years ago
views add docker file 5 years ago
.gitignore seperate theme from repo 5 years ago
.travis.yml fix travis 5 years ago
CONTRIBUTING.md add contribution guide and licence 5 years ago
Dockerfile add docker file 5 years ago
LICENSE.md add contribution guide and licence 5 years ago
README.md tidy up server 5 years ago
_config.yml tidy up server 5 years ago
app.js add logs 5 years ago
config.json tidy up server 5 years ago
package.json add docker file 5 years ago

README.md

Static-Site

Build Status

A Static Site for redbrick generated with hexo using a theme based off tranquilpeak Documentation for hexo can be found here and the themes documentaion can be found in themes/tranquilpeak/docs

Demo at butlerx site

Requirements

  1. Node : v0.10.35 or higher. Download Node
  2. Hexo CLI : v0.1.4 or higher. Run npm install hexo-cli -g
  3. ESLint : v2.3.0 or higher. Run npm install eslint -g
  4. ESLint config Google : v0.4.0 or higher. Run npm install eslint eslint-config-google -g

Setup

To set up just run:

  • npm run setup this will install the theme
  • npm install this will install all the dependencies

Generate

  • To demo the site run hexo server. This will create a server that runs on localhost:4000
  • To generate HTML to be deployed
    1. Set url & root in _config.yaml
    2. Run hexo generate - The generated site will be located in the public directory
  • To deploy:
    1. Edit the deploy section in _config.yaml
    2. Run hexo deploy
    • Alternatively, you can run hexo generate --deploy

Development

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

CSS and Templates

  • You can edit the css for the theme in theme/tranquilpeak/source/_css
  • You can edit the templates in theme/tranquilpeak/layout
  • If you edit the theme it will need to be regenerated. This is done by running grunt buildProd from theme/tranquilpeak

Deployment

To deploy to a server run:

  • npm run setup to download the theme
  • npm install
  • hexo generate
  • modify config.json with mailhost info
  • node server

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

Google analytics

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