Welcome! This is the Github page for the 2022 version of the BuildingBloCS Website.
Go to this year's version of the BuildingBloCS page on Github here. At the top of the page, click on the big green button titled "Code". From there, select your preferred method of installation.
The website makes use of the following:
Yarn is the selected package manager for our project. In the base folder of the project, run
yarn install
to install all subdependencies. If you havenode.js >=16.10
installed, you just need to enable yarn withcorepack enable
yarn install
We use Ruby and RubyGems for this page. Using a tool like rbenv
is recommended to install ruby as certain linux distributions may have an old version built and cached in their archives
After installing RubyGems and Bundler, install the necessary gems as per the instructions here by doing
bundle install
bundle install
Visit the Jekyll docs for more information on the directory structure.
The following is an example of the folder structure in the root folder.
.
├── about
├── assets
├── competitions
├── _config.yml
├── _data
├── events
├── Gemfile
├── Gemfile.lock
├── Gruntfile.js
├── _includes
├── index-en.md
├── index-jp.md
├── index-zh.md
├── join-us
├── _layouts
├── node_modules
├── package.json
├── past-years
├── README.md
├── workshops
└── yarn.lock
To create a subpage that is viewable on the website, create a folder in the home base directory and place an index.md
file containing the relevant info. For example, see the about
page below.
about
├── about-us
│ ├── index-en.md
│ ├── index-jp.md
│ └── index-zh.md
├── buildingblocs-youtube
│ ├── index-en.md
│ ├── index-jp.md
│ └── index-zh.md
├── contact
│ ├── index-en.md
│ ├── index-jp.md
│ └── index-zh.md
└── partners
├── index-en.md
├── index-jp.md
└── index-zh.md
As per our internationalisation efforts, there should be a separate markdown file for each language specified in
_config.yml
. If one is not provided, the page will still work due to this.
These files are used in other files as templates, or are core to the functionality of the website.
.
├── _data
│ ├── organisers.yml
│ └── partners.yml
├── _includes
│ ├── footer.html
│ └── navigation.html
├── _layouts
│ └── default.html
├── assets
│ ├── css
│ │ └── ...
│ ├── img
│ │ └── ...
│ ├── js
│ │ └── ...
│ └── sass
│ └── ...
└── _config.yml
Note that under assets
, only edit the respective SASS files (.scss
) as the SASS files will be used to generate the CSS file style.css
, and any changes made to style.css
will be overwritten on every update.
For more information, visit the SASS website.
The following files should not be touched unless you know what you are doing.
.
├── node_modules
├── .gitignore
├── .gitmodules
├── Gemfile
├── Gemfile.lock
├── Gruntfile.js
├── package.json
└── yarn.lock
Upgrading to latest compatible version. This is strongly recommended.
yarn upgrade --latest --caret
To upgrade all dependencies to the latest version. This is not recommended.
yarn upgrade --latest
Only required if you are modifying stylesheets. Start grunt
(tool to build .scss
to .css
) and make it watch for file changes:
yarn build watch
If you want to just build and exit, do:
yarn build
Jekyll is used to run a localised version of the website, that allows you to easily view the changes you make. Run jekyll serve
in your project folder and type http://localhost:4000
into your web browser of choice to view the website.
bundle exec jekyll serve
We strongly encourage local development and making pull requests as editing via the online environment could be messy and hard to organise. Thank you!
To submit your changes, please either commit changes to a different branch or fork the repo and Create a Pull Request. Use the template in the .template
folder for making a Pull Request.
To make this the site that visiting buildingblocs.sg redirects to, see this Repository.