~ Official website of the GCCR ~
👉 To add new survey links, edit _data/survey-links.yml and be careful with the indentation !
- Setting up the environment
Start by installing Jekyll and its dependencies by following the instructions here
We recommend you to update Ruby Gems and the bundler after that:
gem update --system
bundle update --bundler- Cloning the repository
git clone https://github.com/GCCR/GCCR.github.io.git
cd GCCR.github.ioThe master branch is used to build the website.
Modifications on this branch will directly affect the website so push commits on this branch only after testing them locally.
When making big changes, you should push your commits to a new branch, then open a pull-request so that it can be reviewed by others. Once approved, your branch will be merged with the master branch which will automatically trigger an update of the website.
A few reminders about git:
- To identify which branch you're working on, use
git branch. - To switch between branches, use the
git checkoutcommand. - If you realize too late that you've started working on the
masterbranch instead of a new branch, you can move your changes to a new branch with thegit switch -c my-new-branchcommand. - To push your changes from a branch
new-branchto GitHub, usegit push -u origin new-branch.
- Running the website locally
You'll need to install a few plugins first
bundle installYou're done ! To run the server locally, type bundle exec jekyll serve and the default address should be http://localhost:4000/
I heavily suggest that you quickly go through Jekyll's tutorial to understand how Jekyll works.
- Organization of the repo
surveysfolder: all the translations for the surveys pages are located here_datafolder These files should NOT be modified manually, except:- To modify the links of the navigation bar, edit _data/navigation.yml
- To add new survey links, edit _data/survey-links.yml
_includesfolder: all the repetitive HTML code (navigation bar, footer, contact form...etc.) is gathered here_layoutsfolder: contains templates for the website pages (a default layout shared by every page, and a template for blog posts which inherits from the default one)_postsfolder: where blog/news posts will be located.⚠️ All files in this folder should be namedYYYY-MM-DD-short-title.md. The format used by these files is Markdown, but you can also use plain HTML if you're comfortable with it. The front-matter at the begining of each .md file is used to specify the author and the title (and maybe more things later). You can use a custom alias for the author name by creating a new entry in _data/authors.yml. If you don't want to create an entry, simply type you full name, and it will use the default GCCR avatar and link the GCCR Twitter instead of your own._sassfolder: contains custom SCSS files._scriptsfolder: scripts to automatically generate some files (for now, the members map and listing)assetsfolder: all images, javascript resources, css stylesheets...etc. are located herenewsfolder: contains the front page for the blog/news section._config.ymlfile: the configuration file read by Jekyll. This is where you configure the default layouts used by each page, permalinks, plugins for SEO...etc. You can access the value of any variable in this file through{{ site.my_variable }}in your HTML code.