This repository holds the code for CodeWith, a group in the UK that offers free coding help and tuition.
We run events online and manage it all through our Discord Server. It's all free, so if you're in the area please come along!
You can see our current events at https://www.codewith.org.uk/events
| Branch | Purpose | Who can commit |
|---|---|---|
| Master | The Live branch, commits here will appear in the live website | Maintainers, only from the release branch |
| Release | Tested code that is ready for the live website | Maintainers, via pull requests |
| Feature/* | New code being developed | Contributors |
Please submit pull requests with useful descriptions, if you don't know how to use pull requests ask in our Discord group.
Testing is important for maintainers and contributors alike. Ensure all aspects of the site work as the did previously before submitting a pull request.
Things to look out for when testing
- Responsive design - how does the page display on different devices, and different orientations.
- Browser support - Test your changes in a few major browsers, are there any errors?
Before pull requests are merged maintainers should test all aspects of the site.
Jekyll is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website. You can tweak the site’s look and feel, URLs, the data displayed on the page, and more.
Quoted from https://jekyllrb.com/docs/
You may run Jekyll to serve the CodeWith website locally via docker
You must first install Docker for your operating system.
Next, you must then build the docker container, that will install the dependencies required for the application to run. You will need to run this command at any point the Dockerfile changes to ensure you have the latest version of the container.
docker build . -f docker/bundle.Dockerfile --tag 'codewithgroup-website'At any point at which you then want to run the server, use
docker run -it -v .:/app -p 127.0.0.1:4000:4000 codewithgroup-websiteDespite what the output may say, you will access the CodeWith website at 127.0.0.1:4000
Changes to files within the project will prompt a recompile after some time, you'll need to refresh the page you're viewing in the browser to see the changes.
Provided you have followed the steps above, you may wish to decide to skip this step.
However, if serving via Docker is unsuccessful, and you're familiar with Ruby gems, try running the following:
gem install bundle
gem install jekyll
If this is your first time using Ruby or gems, use this guide to setup Jekyll for your operating system.
Open a command line in the root directory of the repository.
If this is the first time you have built the site, make sure you have run bundle pack before attempting to build the site using jekyll.
:Warning: The website uses extensionless links, meaning we don't need to include the '.html' extension on web pages and in anchor (<a>) links. In order that these links work while you view the site locally, open a new command-line window, navigate to the folder containing the website's source code, and run bundle exec jekyll serve. Leave that window running while you make your changes. This will start a local server and the address is shown in the command-line.
The site rebuilds after every change, so just refresh the page in your browser to see the changes.
:Warning: do not edit anything in the site folder as it will not be comitted and is overwritten everytime you build the site.
Jeykll has functionality to include files, which this site makes extensive use of. You can find the documentation for includes here: https://jekyllrb.com/docs/includes/
- Create a branch
- Make a copy of one of the existing bios in _data/people/
- Name it using the convention yourname
- Modify to be your bio including
- Photograph
- Information paragraph
- Twitter (optional)
- Things you can help with
If you need any help, contact one of the pople who have already added themselves.
All pages not defined as a default in _config.yml are added to the sitemap
To exclude a specific page use the snippet sitemap: false at the top of the page
include_relative): add the page as a default in _config.yml otherwise the sitemap:false is displayed as HTML on the page.
-
scope:
path: 'pages-people/*'
values:
sitemap: falseAll files in _include are excluded from the sitemap automatically
- Add a key to the Jekyll build options at the top of the page
e.g.
suffixes:
- Databases,
- Docker,
- Git,
- SQL,
- Kubernetes,
- Us