Generate website in Github Pages using jekyll
Generate website in Github Pages using jekyll
Install jekyll
- Check quick_start
Basic steps:
-
Run
jekyll new website_name
to create a website project -
Go into ‘website_name’ folder
-
Make sure the jekyll version used next is consistent with its github version
- comment
gem "jekyll", "3.5.0"
in “Gemfile” - uncomment
gem "github-pages", group: :jekyll_plugins
in “Gemfile” - run
bundle update; bundle install
- Check link for running a local version of jekyll which is consistent with Github Pages version
- comment
-
Push local folder to a git repo
Add equations to markdown
-
Run
bundle show minima
to locate the directory of theme html folders -
Locate ‘_includes/’ folder. If it is not in jekyll website directory, create one in the directory
-
add javascript into ‘_includes/head.html’ in website directory. Check link
General instructions
- Check link
Tips
- Use
bundle exec jekyll new site_name
whenjekyll new site_name
is not working