Skip to content

3. Editing content locally, testing and deploying to gh pages

Daniel Pett edited this page Dec 19, 2018 · 1 revision

The website is split into portions:

  • News
  • Team
  • Coffins
    • Senuitef
    • Nahktefmut
    • Nespawershefyt
    • Pakepu
  • Resources

Much of the content will be stored in folders preceded by an underscore (which are known as collections in the Jekyll architecture.) So for example:

_pakepu

Content is rendered from markdown files (ending in .md) and these are interpreted into HTML and stored as static files in the compiled website. So for example in the root folder, you will see these files:

  • index.md
  • coffins.md
  • team.md
  • resources.md
  • news.md

Each of these files renders as the top level url for example https://egyptiancoffins.org/resources is compiled directly from this text file.

However, pages can be more complex and use logic to loop through folders of files to produce menus.

Editing content and files

I recommend the usage of a piece of software called an IDE or integrated development environment. I tend to use PyCharm Community Edition a lot, or another good package is Atom.

So once you have a package for editing installed, you can navigate the site tree easily. If you want to edit Nakhtefmut's introductory page, you would navigate to _nakhtefmut/index.md and make your changes and save the file.

Now you want to see the changes in effect, and earlier in the wiki we talked about firing Terminal up to get Jekyll started. So if you haven't got it running already do the following:

cd Documents/githubProjects/egyptiancoffins
jekyll serve

You should then be able to go to the site at http://127.0.0.1/nakhtefmut and see the changes you made.

Making your changes go onto the website

This is where an earlier piece of software you installed comes into play. We installed something called GIT earlier on. This is used for version control, so we can roll back changes, find out who made what change, allow collaboration and be generally a good tech person. I will assume you have signed up for github and done as detailed in the using github section of this wiki.

So you will want to do the following when you are ready to commit changes to the website:

  1. Open terminal and navigate to the folder Documents/githubProjects/egyptiancoffins
  2. Now you need to type: git add * and press enter
  3. This step adds all your changes to the system before pushing them out
  4. This next part is important, you need to describe why you made the change - be succint - inside quotation marks. So now type git commit -m "The reason why you made the change" and press enter
  5. You are now ready to make your change online. So now type git push -u origin master This will probably ask you for your username and password for github, enter when prompted. Your changes should then be pushed onto this page which is called a repository.

Once this is done, the platform that hosts the website recompiles the code and deploys it to live. You should see your changes within a few minutes. @portableant will get error messages sent automatically if the build fails.