-
Notifications
You must be signed in to change notification settings - Fork 182
Editing Moonrise off GitHub
Questions:
How do I edit Moonrise locally/on my PC?
How do I host Moonrise on a different service?
Why does downloading Moonrise not work?
Moonrise was built with GitHub Pages in mind. This means it doesn't use regular HTML files.
Instead, it uses text files (in Markdown format), which makes editing files on GitHub fast and easy!
- You will be editing regular text files (in Markdown format) from the GitHub website
- You will need to process these text files using Jekyll to get HTML files
- GitHub does this automatically
- The processed HTML files need to be hosted at a domain (such as example.com)
- GitHub does this automatically
Follow the instructions on the homepage, and you're done! GitHub Pages automatically converts the text files into a website for you, and then hosts it for free (!!)
First, you'll need Jekyll, because that is what processes the text files into a website. Mac OS/Linux users click here. Video walkthrough for Windows here. Guide below is for Windows:
- Download Ruby+Devkit - With Devkit, click whichever is in bold
- Run the
ridk install
step on the last stage of the installation wizard - Run "Command Prompt" by searching for it from the Start Menu, then type
gem install jekyll bundler
- Check if Jekyll has been installed properly by typing
jekyll -v
Next, you'll need to build the website from your text files. You'll need to do this every time you want to edit or see your website from your computer.
- Open the moonrise folder in File Explorer, type "cmd" in the URL bar and press Enter
- Type these commands one line at a time:
bundle update
bundle exec jekyll serve
http://localhost:4000/moonrise/ is a "fake domain name" using your local computer network to allow your computer to display the website, as if it was live on the Internet. Without this, you won't be able to see Moonrise.
After you make a change, just reload http://localhost:4000/moonrise/. Jekyll will automatically build your website while it's running.
To exit out of Jekyll, press "Ctrl+C" in the Command Prompt window and it'll stop.
If you have Git installed, you probably know how to work out a seamless solution.
If you don't, just upload the changed files back to GitHub! GitHub will take care of everything.
Optionally, you can download GitHub Desktop to keep your whole repo downloaded and synced. When prompted, choose the option to make your own copy of Moonrise.
If you have a custom domain name, change the _config.yml
so that:
url: "https://yourdomain.com"
-
baseurl: ""
(empty quotes)
-
Open the moonrise folder in File Explorer, type "cmd" in the URL bar and press Enter
-
Type these commands one line at a time:
bundle update
bundle exec jekyll build
The HTML files are in the _site
folder