I am using github pages + jekyll to establish my blog.
It worked properly before pushed my latest commit. This commit adds a cname file and just edits some words without any alterations over the architecture of my site.
- <h3 class="description">aaaaaaaaaa</h3>
+ <h3 class="description">bbbbbbbbbb</h3>
After that markdown does not appear properly.
When I write #head1. It does not appear title head1, it just appears #head1 directly.
However, if I use jekyll serve build in localhost:4000, it appears correctly.
This is my _config.yml:
markdown: kramdown
markdown_ext: markdown,mkd,mkdn,md
textile_ext: textile
highlighter: pygments
Any ideas what has been causing this error?
UPDATED!
This is most likely due to Jekyll 3 upgrade on GitHub Pages.
From May 1st 2016 on, GitHub will not support rdiscount nor redcarpet anymore. Also, since February 1st, GitHub Pages only supports rouge:
Starting May 1st, 2016, GitHub Pages will only support kramdown,
Jekyll's default Markdown engine.
GitHub Pages now only supports
Rouge.
You can check this out here.
In order to deal with it, proceed as the following:
First, try as explained on this answer. Instead of #Heading you'll write # Heading.
Second, adjust your _config.yml: change highlighter and markdown for
highlighter: rouge
markdown: kramdown
kramdown:
input: GFM
Third, to build your site locally, use Bundler, the method recommended by GitHub:
Install Bundler:
gem install bundler
Then run bundle update - this will update all your gems, including github-pages, if you already have this gem installed locally.
Then, create a Gemfile (leave it without any file extension) with the following content:
source 'https://rubygems.org'
gem 'github-pages'
Save it to your project's root.
Then, run bundle install on your project. This will create a file called Gemfile.lock and will install all required gems and their dependencies.
Finally, run bundle exec jekyll serve --watch and you'll be able to view your website locally exactly as you'll view online (when hosting on GitHub).
You should be OK by then!
PS. If your project needs more gems, as jekyll-paginate or jekyll-mentions, you'll need to add them to the Gemfile, for example:
source 'https://rubygems.org'
gem 'github-pages'
gem 'jekyll-paginate'
Also, add them to your project's _config.yml:
gems:
- jekyll-paginate
- jekyll-mentions
Here you'll see a list of gem versions currently supported by GitHub Pages. Here you read about Upgrading Jekyll 2 to 3.
Hope to have helped!
A slight observation running my own Jekyll powered github pages blog,
A space between the # representing the heading size, and the heading text is important otherwise the markdown will not display as intended. Therefore with your example, I would display my markdown heading as,
# Zookeeper Atomic Broadcast for heading 1
## Zookeeper Atomic Broadcast for heading 2
### Zookeeper Atomic Broadcast for heading 3
#### Zookeeper Atomic Broadcast for heading 4
##### Zookeeper Atomic Broadcast for heading 5
GitHub support markdown as well jekyll.
First of all rename your file with the .md extension
If you have .nojekyll in your folder it will disable njekyll.
Verify that you don't have this is your folder.
Read the docs && GitHub relevant doc on how to prepare and deploy
Running Jekyll
Use the command git checkout to switch to the default branch that the GitHub Pages build server uses to generate your site. The default branch you switch to depends on the type of GitHub Pages site you're building.
For Project Pages sites, switch to gh-pages.
For User Pages or Organization Pages sites, switch to master. For more information, see "User, Organization, and Project Pages".
Use the command bundle exec jekyll serve in the root of your repository to run the GitHub Pages build server with Bundler.
bundle exec jekyll serve
Navigate to http://localhost:4000 to see your local site.
Related
I am a total programming noob and assume I'm missing something basic.
I forked this repo: https://github.com/colinmorris/tour-of-heroes
Here is the author's page for that repo: https://colinmorris.github.io/tour-of-heroes/
My fork: https://github.com/SmallFryHero/tour-of-heroes
My page based on that fork: https://smallfryhero.github.io/tour-of-heroes/
My page does not load.
I deployed the Github Pages using the gh-pages branch and from the /root folder.
I imported the code into a different web editor, CodeSandBox, and I can get it to run there along with my changes.
What do I need to fix to get it to run on my Github Pages? I added a readme to get the page to build. It seems to be deployed, but doesn't get past the "loading..." step.
Thanks for any help! Sorry for the total noob question.
The issue is that GitHub Pages, by default, use a static site generator called Jekyll under the hood. It basically converts a set of Markdown files into HTML (and provides templating, themes, plugins, and more).
In the case of your repo, which consists exclusively of static assets, Jekyll doesn't do much, but it does exclude the node_modules directory (see logs), which leads to the scripts in there being unavailable to the deployed page.
To fix this, you can indicate that you wish to skip any Jekyll processing and just upload the files as they are; to do so, add an empty file .nojekyll to the root directory in the gh-pages branch, as described in the documentation.
The repo from which you forked was last deployed multiple years ago, and I suspect the Jekyll default configuration back then didn't exclude node_modules yet.
I created a GitHub page with a repository called myusername.github.io
I cloned that (empty) repo to my PC and using jekyll command line I created a new blog inside of this folder. It was building correctly on my PC and on GitHub with the standard theme 'minima'.
However, I wanted to use the 'architect' theme and followed their instructions (just add theme: jekyll-theme-architect on the _config.yml) to use it but got a messed up page as a result. What is going on? How can I fix that?
I am totally pissed off by this. The instruction is so simple, but does not work!!!
This is due to not having the proper gem locally, so you can install the gem explicitely or add the github-pages gem that contains that theme as it is supported by Github pages.
Add the following to your site's Gemfile:
gem "github-pages", group: :jekyll_plugins
then run bundle install.
Edit index.md and change the layout to the default one: layout: default.
Remove the lines that contains an include tag in about.md for example: {% include icon-github.html username="jekyll" %}.
and you will be able to use the new theme.
I've built a site on Github pages with Jekyll. Recently I tried running an emoji_for_jekyll plugin. When I build and run the site locally, it seems to work. However, when I commit and view it online the emoji disappear and all that's left is the syntax (:smile:)
Here is a page on my site http://joshuahouston.github.io/code/2014/12/10/the-emoji-test.html
This is the resource I've followed. The 3 steps seem easy enough.
Install the emoji_for_jekyll gem:
gem install emoji_for_jekyll
Add emoji_for_jekyll to the list of gems in config.yml:
gems: ["emoji_for_jekyll"]
See beautiful emoji!
or
Copy emoji_for_jekll.rb and emoji.json into the _plugins directory
And you can view my site's pages on Github and they're even working there! https://github.com/joshuahouston/joshuahouston.github.io/blob/master/_posts/2014-12-10-the-emoji-test.markdown
Do you know what I'm missing? Why aren't the pages being generated correctly for the site but correctly elsewhere? Thank you.
Not all plugins can be run on Gitub pages (see documentation here).
If you want to use emojies on your gh-pages, you'll have to use parkr jemoji.
gem install jemoji
remove your _plugins folder content
change gems in _config.yml to gems: ["jemoji"]
test with a jekyll serve
push to Github
be happy ;-)
In my case, I test directly on Github. I did two changes:
Step 1: add gem 'jemoji' to Gemfile
Step 2: add - jemoji to _config.yml
GitHub pages does not support plugins, but plugins are clearly very useful (e.g. jekyll-scholar).
Nitrous.io supports adding plugins to your GH pages site, but this seems a little involved. Is there any simply way to get plugins working on my github site, or should I just make _site/ the root, as the jekyll-scholar dev. recommends?
The method described in the Nitrous.io blog post can actually be used with a local Ruby/Rails environment, which removes some of the complexity. There's an even more convenient Rakefile setup from David Ensinger that implements the deployment steps proposed by Randy Morris.
Essentially, these Rakefiles are just conveniences to batch the deployment of both your Jekyll source (with plugins) and compiled _site to GitHub Pages as the jekyll-scholar dev recommends. Since your site is a User Pages (username.github.io), then you'll want your compiled _site to end up in Master, and your Jekyll source with plugins in a separate Source branch. If you want to first experiment with a Project Page, then you'll want your _site to end up in the gh-pages branch (which can be accomplished with this Rakefile)
I recently wanted to publish my Jekyll site on Github pages, but it seems that putting everything in a subdirectory is giving some issues, even after I change the source to the correct directory.
My structure looks like this:
- site
- src (contains all Jekyll stuff)
- README.md
- GruntFile.js
- ...
Locally my site builds perfectly and when I go to http://localhost:4040 I can see it just nicely, but when I commit this to my Github and visit username.github.io I get a 404, if I go to username.github.io/src I can see part of my site, however all {% include %} are ignored.
In my _config.yml I updated the source: source: ./src, but that doesn't seem to help.
Is there a way to make Github Pages handle subdirectories properly? Basically I want to tell it that my Jekyll site is inside /src, and I want the url to just be username.github.io instead of username.github.io/src
I know i can use the pages branch and commit to there, but I would prefer if it could happen automaticly.
If it helps anyone, I attempted to run Jekyll on GH Pages from a subdir (and modified source) and was banging my head against the wall over these errors:
A file was included in subdir/index.html that is a symlink or does not exist in your _includes directory. For more information, see https://help.github.com/articles/page-build-failed-file-is-a-symlink.
After much searching on this, the definitive answer was right there in the docs:
Configuration Overrides
We override the following _config.yml values, which you are unable to
configure:
safe: true
lsi: false
source: your top-level directory
Keep in mind that if you change the source setting, your pages may not
build correctly. GitHub Pages only considers source files in the
top-level directory of a repository.
I contact Github support and they gave me 2 solutions.
Move all my Jekyll source files to my top-lever directory.
Use a different branch and update it manually each time.