Jekyll blog theme now showing blog posts on GitLab Pages - ruby

I've been using the Emerald jekyll theme for my blog on GitHub Pages. It all works great on GitHub, but I've wanted to move to GitLab.
I got the blog working with all necessary gems (like jekyll and jekyll-paginate), but the blog posts aren't working and I get 404.
Test it live here
I made the repo public so everyone can have a look and possibly identify my problem.

Just add a .html extension to your links.
https://remieditor.gitlab.io/blog/plausible-gitlab-moving.html
Github provides an option for serving without the extension, however I don't believe that Gitlab allows this yet. See this thread: https://gitlab.com/gitlab-org/gitlab-pages/issues/95
Change your permalink configuration:
permalink: /:title:output_ext

Since GitLab 11.8 (February 2019) this should work
.html extensions are now automatically resolved for Pages sites
A file in your Pages site called /sub-page.html can now also be accessed as /sub-page, giving you more options over how your site appears to your users.
See documentation and gitlab-org/gitlab-pages issue 95

Related

What theme was used to make the Jekyll homepage

Was the Jekyll home page made with Jekyll? And if so what theme did they use and is it publicly available.
I recently noticed that the site dev assets looks very similar to the Jekyll home page and uses Jekyll, however while looking through the source I could not find the name of the theme in any of the config files.
Thanks in advance for any help.
I went through the docs/ directory of the jekyll repository. They're definitely using Jekyll. In _sass/, only two files are not original:
_gridism.scss, GitHub Repo: gridism
_normalize.scss, GitHub Repo: normalize.css
All the rest are essentially original, as in the developers of the website made the theme themselves.

Jekyll or Hugo theme with multilanguage support

I'd like to start designing a website using Jekyll or Hugo. The plan is to publish it on GitHub or GitLab pages.
After hours of searching I'm pretty confused about all the facts. Hugo support natively a multilanguage utility while Jekyll not. There are some plugins for Jekyll but plugins are not supported on GitHub pages anyway.
With Jekyll I tried to follow this solution without any concrete solution for the translation of the layouts while with Hugo I've found the instruction pretty confused (but that's my fault).
What I'm looking for is a theme (Jekyll or Hugo it doesn't matter) that is already designed with 2 (or more) languages.
Beside the official Hugo instructions for creating a multilingual site, you also have:
multilingual examples which has been recently updated
multilingual mode
themes with multilingual already baked in as (from the Hugo themes list site):
hugo-scriptor-theme
dimension
docuapi
Plus, with Hugo 0.87 (Aug. 2021), you also have Date/time formatting layouts and localized string for the current language.
As well as the themes that VonC linked to, there is the Beautiful Hugo theme which I recently updated to work with multilingual sites.
I also recently made an example of a multilingual Hugo site in hugo-multilingual-example at Github, so you can compare that with the example in the Hugo repository that VonC linked to.
With Hugo, you should ignore the "Create a Multilingual Site" tutorial, as it was made before the native multilingual support was added, and is now outdated. Instead, you should base everything on the "multilingual mode" documentation.
Hopefully that should be enough to get you started, but let us know if you have any other problems.
I localized a Jekyll theme to output to German and Japanese here. It depends what requirements you're trying to support. We sent out translated files to a translation agency and then reimported them back into the project.
My strategy in defining the theme was to put each language in its own collection. Each collection defines default values for top nav and footer to be in that language.
Additionally, I used a different config file for each language. The language's config file defined strings for that language. File names and URLs remained in English.

Blog not rendering using middleman

I created a middleman blog using this tutorial and documentation. Since I had an older blog, I copied few of my posts and pasted into source folder.
Now when I start server, I don't see any of my posts. Can someone help me with this?
Latest code is hosted on github-pages.
Resolved this one by moving my posts to source/blog folder.
My config.rb I had following set up as -
blog.prefix = "blog"
Hence, it was looking into blog folder for articles. Moving them resolved my issue.

Jekyll page failing on github but works successfully locally with --safe flag

I have a Jekyll based post which works successfully when running locally with the --safe flag on. However, the page build fails on github pages. I am not using any plugins either. Can someone please help me figure out what is not compatible with github? Their page is not very helpful. I'm already following their advice of not plugins and using --safe locally to test before committing.
Link to my post: https://raw.github.com/danishm/danishm.github.com/master/_posts/2012-07-23-maintaning-read-more-links-when-moving-from-drupal-to-jekyll.md
Could it be the usage of {% raw %}? or the fact that I am trying to talk about liquid template code itself and trying to syntax highlight it
The issue is due to the fact that github pages uses liquid 2.2.2 and my local install was using liquig 2.3.0. The filter {% raw %} is new in 2.3 and not available in 2.2.2. In version 2.2.2, you need to use {% literal %} instead.
Once I made that change, the page got built successfully on github pages and is now visible on my blog.
I was also able to reproduce the issue locally by installing Jekyll 0.11.0 and liquid 2.2.2, which is what github pages use.
Not sure, but there might be something wrong on GitHub, their status page shows that there was some problems with Pages (25th Jul 2012), that should be fixed now, but I still have same issues as you, pages won't compile, and local run w/ jekyll --pygments --safe works fine.
If you had used Jekyll version 1.0 at the beginning, you may config 'auto' option in _config.yml file. But the current version of Jekyll is 1.2.x, so this option is depreciated. In my case, it made my errors: successfully in local but not working in git page. The solution is so easy, just comment this line: "auto:true". Everything seems OK. In more details, you must comment that line to turn on Auto-regeneration feature which allow the server regenerate html pages automatically.

Best way to create a blog with static pages in Ruby

I just visited the Static Website Generation on Ruby toolbox and I don't know which of applications listed there is best suited for a little blog engine. Basically I need:
an index page with 1..5 of latest articles with shortened content;
possibility to add few main pages and a menu to access them (breadcrumb optional);
show articles
show/search archives
commenting system - Disqus Ok
tag-list cloud - optional
Look&Feel via layout
Important all content will be translated in 3 languages!
I can host on my own server, so side processing is possible.
Update:
First I'll try nanoc => blog's source on github
I think nanoc worth a try it has everything you specified, even if is not the best ranked on ruby toolbox its actively developed and highly customizable.
nanoc is a tool that runs on your local computer and compiles documents written in formats such as Markdown, Textile, Haml… into a static web site consisting of simple HTML files, ready for uploading to any web server.
and thats true :) I use it for a while not specially for a blog, but it has also helpers for that...
check out jekyll, it should work well for this.
Try my own "serious" - apart from archive search and tag cloud, it has everything you specified, plus the basic install should take you something like 5 minutes on heroku (and maybe 10 on your own server via Rack). It also has syntax highlighting, Disqus comments, Google Analytics and other goodies.
http://github.com/colszowka/serious
gem install serious
Disclaimer: It does not produce static html pages you can upload to your php vhost, though. But it uses caching and is really easy to setup and works on the free plan on heroku.

Resources