Jekyll/Github site does not show correct sample blog post on Github - github

I am running Windows 10 with GitHub Desktop. I installed Jekyll and tried to create a test blog.
I started with the instructions at:
https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll
I created the repository in GitHub Desktop and immediately published it to Github.com.
When I use GitHub Desktop to "open in bash" as mentioned in the link above, I get sent to:
E:\codingPractice\DocSourceBlog\DocSourceBlog>
Following the suggestions in the link above, I enter:
E:\codingPractice\DocSourceBlog\DocSourceBlog>mkdir docs
E:\codingPractice\DocSourceBlog\DocSourceBlog>cd docs
E:\codingPractice\DocSourceBlog\DocSourceBlog\docs>git checkout --orphan gh-pages
I enter $ jekyll new . and I get
New jekyll site installed in E:/codingPractice/DocSourceBlog/DocSourceBlog/docs.
I edit the gemfile, comment out the "gem jekyll" and change the next line to
gem "github-pages", "~> 214", group: :jekyll_plugins
by substituting the current version number into the boilerplate of the above link.
I run bundle update and bundle exec jekyll serve and localhost:4000 shows the expected site, including a sample blog post that can be accessed by clicking "Welcome of Jekyll!" That sample blog post starts off with:
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways,
I use GitHub Desktop to commit the changed files to the branch and publish the branch to GitHub.
I refer to instructions at:
https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source
I go to github.com/longarchivist/DocSourceBlog/settings/pages and set the source to "gh-pages" and "docs"
I go to https://longarchivist.github.io/DocSourceBlog/ and see that some of the content is there, but the blog post does not seem to show up as expected at "Welcome to Jekyll!" I click the link and get to
https://longarchivist.github.io/jekyll/update/2021/04/18/welcome-to-jekyll.html
but that has the 404 page.
I check the github web interface to make sure that the "_posts" directory is there.
I noticed that the address of the "Welcome to Jekyll!" link was:
http://localhost:4000/jekyll/update/2021/04/18/welcome-to-jekyll.html
I can speculate that ruby somehow destroyed the correct Jekyll configuration when I tried bundle exec jekyll serve but if that was enough to break the system then the documentation seems to be badly misleading.
I tried editing the config file. The "baseurl" variable is now "/docs" and the link address is
https://longarchivist.github.io/docs/jekyll/update/2021/04/18/welcome-to-jekyll.html
However, the desired sample blog post still does not display. Instead
https://longarchivist.github.io/docs/jekyll/update/2021/04/18/welcome-to-jekyll.html
is still a 404 page.
So the localhost problem is not the key to the problem.
Any constructive criticisms would be appreciated.

The best way seems to be to start a root directory that must contain your username first, then start a separate project directory for each project.
After creating a project directory, use "jekyll build" to auto-generate a Jekyll site. Add posts manually in the posts directory: somehow the index finds them automatically.
Then go back to the root site and manually add a link to your project directory.
For example:
https://longarchivist.github.io/
links to
https://longarchivist.github.io/codediary/
which currently has two posts. I created the second post by copying the original, then renaming it. Jekyll apparently expects the post filename to have the correct day and month, so when I use this tactic in the future, I will have to update those manually.

Related

GitHub User Page New Themes and Changes Not Updating

I've been trying to customize my GitHub User page and followed the provided (below) directions precisely.
https://github.com/github/personal-website
The website is running, but I selected the "jekyll-theme-minimal" theme and added the appropriate lines in the "_config.yml" and "index.md" pages. I even copied over the "includes", "layouts", and "assets" folders from the jekyll minimal theme folder itself into my personal website directory. But no updates. Also, I've made a few changes to the website (such as changing the profile photo) but no changes are observed at my personal website below:
https://yjkimnada.github.io
Below is the github directory:
https://github.com/yjkimnada/yjkimnada.github.io
I don't get any errors when running "bundle exec jekyll serve" except:
Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
Faraday::Error::ClientError.inherited called from /usr/local/lib/ruby/gems/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.
Edit: I do see changes coming up at "http://127.0.0.1:4000" even though they aren't exactly the changes I want. They just seem to be reflecting whatever I write in the index.html file and not the _config.yml file.
Add the following to the project's Gemfile
add gem "jekyll-assets", "~> 2.3.2"
This post was helpful for me.
https://dylanbeattie.net/2019/12/12/shaving-the-jekyll-yak.html

404 Error on files that exist in the proper place on GitHub Pages

This is my first attempt at using GH Pages, and I have a pretty simple blog site created with Vuejs.
I've created my repo, then deployed the built code to a gh-pages branch, and the settings are pointed to that branch.
However, I get a WSOD when I try to view my site, and when I look in the console, I get a list of messages that the referenced files can't be found.
When I look in the /static directory in the gh-pages branch, though, all of the files that it says are missing are actually there where they're supposed to be in relation to index.html.
What am I missing that keeps the site from showing?
If you look into the requests, you would find out requesting
https://wonder95.github.io/static/css/app.da01b7b80b6795e91d3ceace476633af.css
This has missed the /smga/ part, and is not what published in your git pages. As the correct link should be
https://wonder95.github.io/smga/static/css/app.da01b7b80b6795e91d3ceace476633af.css

GitHub Pages not updating post

I am currently a very beginner in Jekyll (and also Ruby) and I'm trying the GitHub Pages blog thing at GitHub. Here's the Pages : http://nobodykid.github.io/ and the repo https://github.com/nobodykid/nobodykid.github.io
I've installed Ruby and Jekyll successfully. I've also installed GitHub-pages Gem as instructed in https://help.github.com/articles/setting-up-your-pages-site-locally-with-jekyll
When I tried Jekyll serve for the first time to see it locally. I got this error
cannot load such file -- kramdown
When I tried bundle exec Jekyll serve instead, the site generated successfully. But with this message :
Please add the following to your Gemfile to avoid polling for changes
gem 'wdm', '>=0.1.0 if Gem.win_platform?
when I tried to make a new post and publish everything into my repo, only the first sample post by Jekyll that showed. The post that I created didn't show even though I can see it generated with bundle exec Jekyll serve locally.
Did I do something wrong somewhere? Thank you for any of your help
Might be a time issue - your post date was 3-9 but you did it yesterday which was 3-8 (at least where I am!).
Try doing a commit (of anything) and seeing if it shows now. Remember that the site only builds when you make a commit - so even if the problem was the date, the fact that today is 3-9 won't mean that the post magically shows up - unless it regenerates.

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.

jekyll and github - how to update the blog post?

Good day.
Could you help me with a little problem I am experiencing.
I have a jekyll blog on the github. The problem is after I updated my old post, committed and pushed it, the blog post doesn't show any changes, but I see that the commit has been pushed successfully.
If I run jekyll --server locally, it shows updated blog post and it doesn't report any errors.
I have no jekyll plugins installed.
What am I doing wrong or misunderstanding? Thanks a lot.
Added by Nawaz:
I'm facing exactly same problem. My I pushed added one markdown post and few css, and modified layouts and includes, then I pushed them to github. It is done successfully. My github is showing all the changes in the repository, but the github blog (i.e the generated html posts out of markdown) are still same. No change to them at all. It is showing some posts which doesn't even exist in the repository. But when I do jekyll --server locally, then every update is being shown on my (local) blog hosted at http://localhost:4000.
Please help me!
If your Jekyll site is not rendering properly after you push it to GitHub, it's useful to run Jekyll locally so you can see any parsing errors. In order to do this, you'll want to use the same version that we use.
GitHub's Pages servers currently use Jekyll 0.11.0 with Liquid 2.2.2, and run it using this command:
$ jekyll --pygments --safe
More info
I'm now trying to solve the problems with my pygments highlighting (works locally, doesn't show on github at all, even though I'm receiving mails about succesful build). Findings so far:
Make sure that youre repository' default branch is 'master' (go to your repository Admin page).
Put your Jekyll source files in some other branch, and put the _site content to your master branch. There will be no _config.yml, no YAML front matter so github will render your stuff as is, and you would be building it locally on that other branch. This actually worked for me. It requires some manual labour when moving _site from that other branch to your master, but I'm fine with that - at least I do not have to rely on github build process which seems to be a bit buggy, plus, I can have whatever plugins I wish.
When ever you generate your jekyll site locally for testing, always run jekyll --no-auto --server. This would display if there were any errors encountered during the generation of your site. Also, before generating your site delete _site directory and then run the command as described above.
Let me know if you see any errors as such. We can debug further