Author: Petra Hermankova, @petrifiedvoices on GitHub
Website: static website using GitHub pages infrastructure (Jekyll), pages written in markdown and then automatically transformed to HTML
If you are planning to do a major change (adding new pages, instead of editing the existing ones, changing layout templates and the design etc.) and need help, please contact Petra.
You can easily change the contents of the existing pages, add photos, documents etc.
Markdown cheatsheet on Github - examples of how Markdown works
Markdown interactive tutorial, to test your knowledge and to practice
GitHub and version control: https://guides.github.com/,
Best to start with https://guides.github.com/activities/hello-world/
In order to edit the website, you will need to:
- create a GitHub Account
- ask to be added to the epigraphy-info Github organization (in order to work independently)
- or you can commit your changes and someone from within the organisation has to approve your changes (as merge request, but you will still need to have your own GitHub account)
There are two modes of editing the website:
- only when editing one document and changing small things such as typos or hyperlinks
- potentially unsafe, should be used only for small edits within one file; not for large development
- Go to the website repo.
- Find your document.
- Make edits.
- Commit changes.
- Go to the GithubPages and wait for the server to process the change.
- safer option; steep learning curve but great for tracking changes and collaboration between multiple people
- the easiest way is to use command line (Terminal) on your computer, but if you prefer there are several GUI Clients/softwares that you can use on Windows and Macs such as GitHub Desktop
- Clone the repo to your local computer. In terminal:
git clone “address of your repo”
- Make edits to your files and save them.
- Add changes. Terminal:
git add “file”
- Commit changes. Terminal:
git commit -m “my commit message”
- Push changes to Github. Terminal:
git push origin “name of branch”
- Go to the GithubPages and wait for the server to process the change. It may take up to 10 minutes.
- Go to the folder containing website docs on your computer.
- Pull all new changes from Github to your local computer. Terminal:
git pull
- Make edits to your files and save them.
- Add changes. Terminal:
git add “file”
- Commit changes. Terminal:
git commit -m “my commit message”
- Push changes to Github. Terminal:
git push origin “name of branch”
- Go to the GithubPages and wait for the server to process the change. It may take up to 10 minutes.
If you are planning major changes, or want to see how they look on the website before committing them to GitHub, you can run Jekyll server locally on your computer and test locally. You have to have installed Jekyll and all dependencies on your local computer.
- Go to the folder containing website docs on your computer.
- Pull all new changes from Github to your local computer.
- Using the command line, start the Jekyll server by typing into the Terminal
bundle exec jekyll serve
. You may need to install Jekyll prerequisites to your computer first. - Make edits to all your files.
- Type ‘http://localhost:4000’ in your browser and check the changes you have made on the website.
- Once you are happy with your changes, add them, commit and push them to Github.
- Go to the online GithubPages and wait for the server to process the change.
If you are making a lot of changes at the same time, you may consider creating a new branch instead of making the changes directly to the main branch where the website is stored. Once you are happy with your changes, you can merge the branch with the main by pull request. How to create a pull request is best summarized on this link https://guides.github.com/activities/hello-world/.
- Main page lives in
index.html
document - Other pages live in markdown files with the file extension .md
- Configuration files live in YAML files with the file extension .yml, or in folders
_data
,_includes
,_layouts
,_sass
,css
,js
- The static website lives in the folder
_site
- do not change anything here manually - Photos live in the folder
assets
- Posts in the News section live in the folder
_posts
- please use the provided template post - PDFs, presentations and other documents live in the folder
documents
- For better organisation and navigation between files, some of the pages live in separate folders, such as
meeting_pages
orworking_groups
News
The template post/news lives in the folder _posts
>>> Template post
Photos
The image has to exist locally / on GitHub in the folder assets
<img src='{{site.baseurl}}/assets/XXX.jpg' style="width:100%;" alt="Provide a description of your XXX image" align="middle">
Hyperlink
[This is my public name for the link](https://en.wikipedia.org/wiki/Epigraphy)
Hyperlink to document on this page
The documents has to exist locally / on GitHub in the folder documents
[This is my public name for the document, e.g. the 5th Epigraphy info programme]({{ site.baseurl }}{% link documents/Epigraphy.info_V_Programm.pdf %})
If you add a new page, e.g. a new workshop page, you need to do the following steps:
- create a new file with
.md
extension in themeeting_pages
folder (or in the corresponding folder for working groups, or in the main directory if there is no corresponding folder). You can use existing files with past workshops as a template. - In order to create a record in the navigation dropdown, you need to add the new page in the
_data/
folder in the filesamplelist.yml
following the already existing structure. Mind the indents, as the indentation creates a hierarchy of the dropdown. Make sure you provide a title and correct url, e.g.title: Workshop 1 (Heidelberg)
,url: workshop_1/
as provided in thesamplelist.yml
file. - Once you have added the existing website to the
samplelist.yml
file, commit to Github, wait few minutes and your changes should apprear on the website. - If you are unsure on how to do this, or your changes did not get through, feel free to contact Petra, either via email or GitHub Issues