3

I host a personal website using GitHub pages and I manage the process of changing and improving the site using Git.

My process is to make changes in a 'development' branch and push these to master.

I believe this is a standard process, but my question is: Is there a way of seeing how the website changes before going through all the steps to merge with master? Or can I see and test this change earlier on, say in a test environment?

I have been trying to find an answer to this question for some time. The closest I have got to an answer is here: Can I run HTML files directly from GitHub, instead of just viewing their source?

However when using http://rawgit.com an index.md file only shows as markdown and when using http://htmlpreview.github.io/ all the markdown text appears bunched together. In both cases I can't see any styling as the website is structured using links to external styling sheets and Jekyll front matter.

How can I solve this and view the page as it is supposed to appear?

RS3
  • 101
  • 1
  • 8
  • Personally I just view the site locally on my machine during testing. If you need a server to run, you can use Python's built in server. – Andrew Fan Jul 26 '18 at 22:24

1 Answers1

0

While your pages are hosted on GitHub, they are rendered differently depending on your GitHub pages settings.

If you are using Jekyll as a static site generator with GitHub Pages, you can then setup your GitHub Pages site locally with Jekyll.

The idea remain to check your pages before pushing to GitHub.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @ VonC Thank you for the answer! That's immediately sorted my issue, so simple too. For anyone that finds this helpful, having already setup my Jekyll repository locally all that remained for me to do was run: `$ bundle exec Jekyll serve` and view the local Jekyll site at `http://localhost:4000` – RS3 Jul 27 '18 at 10:02