Trouble implementing specifically just-the-docs theme using jekyll - github

I have been able to install most other jekyll themes but this theme in particular I can not get to render. It always shows up just as markdown and never renders the theme. I've had this problem with other themes, usually it involved fixing the url and baseurl in config or some other theme setting.
Theme in question:
https://pmarsceill.github.io/just-the-docs/
I have tried implementing the theme in my own fresh jekyll build.
I have tried cloning the github repository at:
https://github.com/pmarsceill/just-the-docs
I have tried cloning the REALLY basic version using a remote theme:
https://github.com/pmarsceill/jtd-remote
The main thing I want right now is to clone the just-the-docs repository and create a fork that I can just edit, but I can't even get their working repo to work for me. I tried changing the url and baseurl and looked around the files for other things that might make it different for me vs them. Is there anything else I would have to chance?
I expect a rendered theme, I get a white background page with a bunch of text. I have tried copying their exact repo with no sucecess locally with jekyll serve or on github pages on my own repo.
Why is this theme not working when others are?

I was having a similar problem and there has been an issue raised in the repo that seems like what you are describing: https://github.com/pmarsceill/just-the-docs/issues/148
This solved it for me - from a comment there:
I got the same error few days ago, my solution is separate config files for github and local machine. You can view my setup on https://github.com/taruma/hidrokit-nb/tree/master/docs.
For local (_config_local.yml):
# Local Setting
baseurl: ""
url: ""
# Theme
theme: "just-the-docs"
# remote_theme: pmarsceill/just-the-docs
For github (_config.yml):
# Remote Setting
baseurl: "/guidelines"
# url: ""
# Theme
# theme: "just-the-docs"
remote_theme: pmarsceill/just-the-docs
For live server on local machine, I run bundle exec jekyll serve --config _config_local.yml.

Related

Github pages published but nothing shows up

I built a Jekyll site locally (Jekyll version 4.1.1) and the theme I'm using is Hydeout 4.1.0. The site runs fine locally. I've pushed it to my repository on github and it says the site is published, but the page loads to just a white space.
You just need to change theme: jekyll-theme-hydeout to remote_theme: fongandrew/hydeout and it is working.
I am creating you a pull request on your repo incorporating this change.
Reference:
https://stackoverflow.com/a/52103672/11474769
and usage section of this https://github.com/fongandrew/hydeout/

Github Pages Unsupported Jekyll Theme

I've been trying to use a Jekyll theme from bootstrap called jekyll-theme-clean-blog, and everytime I publish it on Github I receive an email saying, "You are attempting to use a Jekyll theme, "jekyll-theme-clean-blog", which is not supported by GitHub Pages." I tried deleting the "theme" line in my _config.yml, but the page ends up with only the basic HTML and not the template. I have also installed the gem "Jekyll-remote-theme", but it doesn't seem to help. Can someone help me to figure this out?? Or does this mean that I can't use github pages to host the site?? Thank you very much I am a noob.
I found this answer in adding a theme in the help docs, hope it helps. In the _config.yml file:
To use a supported theme, type theme: THEME-NAME, replacing THEME-NAME with the name of the theme as shown in the README of the theme's repository
To use any other Jekyll theme hosted on GitHub, type remote_theme: THEME-NAME, replacing THEME-NAME with the name of the theme as shown in the README of the theme's repository.

How to use other Jekyll themes on github pages than the officialy supported ones

According to Github, the following is the list of jekyll themes it supports:
Architect
Cayman
Dinky
Hacker
Leap day
Merlot
Midnight
Minima Minimal
Modernist
Slate
Tactile
Time machine
If I want to use any theme apart from these, is there any way to go about it?
Remove the theme entry from your _config.yml file (so that you tell Jekyll you're not using a preexisting theme) and commit all the files and layouts that belong to the theme you want to use into the Git repository along with everything else you have (posts, etc.).
Found the way. To use another theme than the ones specified, do not commit the source jekyll files to the master branch.
Instead, run jekyll build --destination dist and then commit the contents of the dist directory to the master branch.

Unexpected urls in my Jekyll website sitemap

I'm creating my personal blog (davioooh.com) using Jekyll and hosting it on GitHub pages.
But I recently discovered a strange thing...
When pushed/deployed to my repository, the blog sitemap.xml includes two extra urls:
<url>
<loc>
http://davioooh.com/assets/javascript/anchor-js/docs/grunticon/preview.html
</loc>
<lastmod>2017-08-11T16:40:49+00:00</lastmod>
</url>
<url>
<loc>
http://davioooh.com/assets/javascript/anchor-js/docs/index.html
</loc>
<lastmod>2017-08-11T16:40:49+00:00</lastmod>
</url>
I can't understand why... I'm not using any anchor-js gem or plug-in...
The only gems declared in my _config.yml and Gemfile are:
gems:
- jekyll-feed
- jekyll-seo-tag
- jekyll-paginate
- jekyll-sitemap
So why I'm getthing that urls?
NOTE: the sitemap is correct when I test the site locally on my dev machine.
NOTE: I'm using a custom theme (regular theme, not gem-based). No theme declared in my _config.yml. Here you find my blog repository: https://github.com/davioooh/davioooh.github.io
UPDATE Tried to replace jekyll gem with github-pages in my Gemfile as suggested by marcanuy. It works locally, but after a new push sitemap still includes the extra urls...
UPDATE Found GitHub pages reference listing default params for Jekyll websites. Default theme is, as expected, jekyll-theme-primer. How can I override this setting if I'm not using gem-based theme?
It comes from your theme: jekyll-theme-primer
Primer is what powers GitHub's frontend. If you're not using this theme explicitly, it probably comes from GitHub Pages' own usage of the Primer framework
Why it works fine locally?
Because you are not using the same dependencies Github Pages uses. To replicate the environment used by Github, you need to use the gem: github-pages.
Why sitemap.xml includes two extra urls?
As #ashmaroli said, these files comes from jekyll-theme-primer which is used by Github Pages, if you are using your own theme files, then just make sure there are no theme: key in your _config.yml and run bundle update. Using the right github-pages gem will fix it and those files won't be included in your final site.
It seems that updating to github-pages v157 the sitemap is generated correctly.
The new version of gh-pages supports the last version of jekyll-theme-primer (v0.5.2).
This solves my issue.
1. Apparently, the jekyll-theme-primer (which usually comes with group: :jekyll_plugins in your Gemfile) is to blame. I.e. theme: minima avoids the creation of anchor-js (but you probably want to run your own theme, and not having minima hang around…)
2. A verified simple fix (giving a warning upon build) is to write
theme: false
in your _config.yml
3. The issue is a known issue and has been fixed 3 days before me writing this. Might day some days (or weeks) until it gets shipped though. If you read this some time from now, probably all you need to is update your gems.

disfunctional jekyll theme for GitHub project page blog --> gh-pages

When I use a dedicated GitHub page to host this blog the theme works, see here.
However, what I want to do is create this blog as a "Project Page", i.e. a subpage of an organization, in this way.
I've been following the tutorial on how to create a gh-pages branch, provided by GitHub themselves.
In conjunction with the "Host on GitHub in 3 Minutes" tutorial from Jekyll.
I can get it up and running with the basic out-of-the-box theme, but I want to use the "twitter theme", but when I followed the command to install it, i.e. rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git" and then pushed to the gh-pages branch, it just completely stripped away all the formatting and now there is no theme at all, see here.
Why did that happen? How can I fix it?
As usual it's a baseurl problem. In _config.yml : set
baseurl: /Description-Logicians-of-EIS
or BASE_PATH if you use Jekyll Bootstrap
If you open up the console in your browser (ctrl + J), you can see the CSS fails to load with a 404.
Failed to load resource: the server responded with a status of 404 (Not Found)
http://eis-bonn.github.io/assets/themes/twitter/css/1.4.0/bootstrap.css
That's probably a good starting point. Where are your css files stored?
Spoiler Alert!
When I visit your repository, the directory pointed to in your header is missing. Instead I find Bootstrap in an entirely different directory.