How to add a blog post via Github
If you’re new to Github you might find it useful to first checkout first-contributions to learn more about
forks,branchesandpull requests.
-
Fork the energy-modelling-ireland.github.io repository to create your own copy (or
origin) of the website that you can edit to your heart’s content.
-
If you have already forked the website and your forked repository is out of date (i.e.
This branch is x commits behind energy-modelling-ireland/energy-modelling-ireland.github.io:gh-pages), please sync it by following thegifbelow. See Sync a GitHub Repo: How To Ensure Your GitHub Fork Is Up To Date

-
Make your changes directly on Github (see docs):
-
Go to your forked repository
-
Create a new branch and name it after what you’re trying to achieve (i.e.
add-github-contribution-guide)
-
To add a new post click into
_posts, clickCreate new fileand name itYEAR-MONTH-DAY-title.md. SeeJekyll.

-
To upload images click into
/assets/images/, clickCreate new file, give it same name as your post (i.e.YEAR-MONTH-DAY-title/), click into it and clickUpload files. To link your post to the uploaded images copy & paste the snippet below into your post and adapt the filepath for your image. See existing_posts/. -
To preview your changes try them out by publishing them on
Github Pages. Click on theSettingstab, scroll down on the settings page, click on thePagessection, select your branch, clickSave, wait a few minutes and click on the link suggested byYour site is ready to be published at https://USERNAME.github.io/energy-modelling-ireland.github.io/to view. SeeGithub.

-
-
Or make your changes locally:
-
Go to your fork’s Github page and clone your fork
-
Create a new branch and name it after what you’re trying to achieve (i.e.
add-github-contribution-guide) -
Make your changes locally and use
git(first-contributions) to commit them locally and when ready to push the changes to your forked repository.
-
-
Submit a pull request with your changes so they can be approved and deployed to the main website (or
upstream).