Production site: http://freshmen.nuscomputing.com/
Staging site: https://meebleforp.com/projects/fop/
This repo contains the source code to build the SoC FOP 2016 website. The site is largely static, written in Jade and SASS with Bootstrap, a touch of JavaScript with jQuery and built with Gulp. Pull requests welcome!
Jade/pug guide: https://pugjs.org/api/getting-started.html
SASS guide: http://sass-lang.com/guide
Since the site is static, the HTML will have to be generated for each server the site will be deployed on so that the URLs are correct.
- Make sure you have node and npm installed
- Clone this repo
- Install dependencies -
npm install
, andgulp
globally - Copy the example config file and edit it -
cp config.json.example config.json
- Build with gulp -
gulp build --env [your environment]
(eg.gulp build --env local
)
- Follow steps 1 - 4 from above
- Make your changes to files in assets folder!
- assets/jade -> HTML files
- assets/styles -> css files
- Do a local build again (
gulp build --env local
) to recompile the assets files. - Start the local dev server by running
gulp serve
. Your browser will automatically open uphttp://localhost:3000
, where you should see the site being served locally - Get cracking! Any changes made to any of the source files should automatically trigger browser reload courtesy of BrowserSync
- Happy with your changes? Do a build for production before submitting PR.
(
gulp build --env production
)
If you don't see the assets, try running gulp assets
, or failing that, manually copy
the static contents of assets/img
, assets/js
and assets/video
over to the
build folder
Variables to be passed to the templates. Required variable:
baseUrl
- string - base URL to the site, to be used for all links and local resources. URL should include protocol. For local development this is set to/
analytics
- boolean - set totrue
to include the analytics code. Only use for production build
Folder relative to the project root to write the built files to. Include the suffix -build
(eg. production-build
), which will be ignored by git.
Copies a .htaccess
file into the root folder that removes the .html
suffix
from all URLs. Only works with Apache.
Reloads BrowserSync when the build is done. Used for local development builds.
Minifies resources (currently only CSS via SASS). Used for production builds.
Generate source maps for the CSS