layout | permalink | title | description | image | lightbox | toc | code_highlighter |
---|---|---|---|---|---|---|---|
page |
/theme |
Papicu |
A minimalist Jekyll theme with text-centric layout. Features dark mode, KaTeX, Sidenotes, Chart.js, Lightbox, TOC, etc. |
true |
true |
true |
Papicu is a minimalist Jekyll theme.
It's been heavily inspired by Clio, another Jekyll theme. In fact, Papicu is basically a fork of Clio. I put it together to meet my own needs. But, if you like it, Papicu is free to use and modify. The source code is available at github.com/lucasrla/papicu.
Try the live demo at papicu.netlify.app.
Main features:
- Dark / light mode
- Privacy-conscious analytics (not Google Analytics)
- Support to KaTeX
- Support to Chart.js interactive charts
- Support to sidenotes (a.k.a. margin notes)
- Support to table of contents (TOC)
- Support to deep anchor links
- Support to lightbox for image zooming
- Expandable & collapsible content
- Lazy-loaded, responsive YouTube embeds with 16:9 aspect ratio
Papicu also includes:
- A homepage that displays a brief introduction and the most recent blog posts in reverse chronological order
- An about page located at
/about/
- A few sample blog posts
- An
RSS
feed
Performance-wise:
- Lighthouse via web.dev/measure: 99 performance (see PageSpeed below), 95 accessibility, 100 best practices, 100 SEO
- PageSpeed: Papicu theme home page scores 99, a heavy-loaded post with third-party scripts gets 93
- W3C: valid HTML
First, have a Jekyll website/blog set up on your local machine.
If you are new to Jekyll, get familiar with it first: jekyllrb.com/docs.
-
Add the following to your
Gemfile
gem "jekyll-remote-theme" gem "katex", github: "lucasrla/katex-ruby" gem "kramdown-math-katex"
-
Install the gems by running on terminal
bundle install
-
Add the following to your
_config.yml
markdown: kramdown kramdown: parse_block_html: true math_engine: katex plugins: - jekyll-remote-theme remote_theme: lucasrla/papicu
-
By default
remote_theme: lucasrla/papicu
points toHEAD
, the latest commit of Papicu. Optionally, you can referremote_theme
to a specific commit, tag or branch:remote_theme: lucasrla/papicu@1316b145a02c610347b9172da3d2feba32aaf595 # pointing to commit: https://github.com/lucasrla/papicu/commit/1316b145a02c610347b9172da3d2feba32aaf595
remote_theme: lucasrla/[email protected] # pointing to (a theoretical) release tag v1.0.0 (please note that papicu has no releases yet)
-
Now, run jekyll on terminal
bundle exec jekyll serve
-
Visit your website at http://127.0.0.1:4000
If you are reasonably well-versed in Jekyll, clone or fork this repository and have fun.
Unfortunately, Papicu is not compatible with the GitHub Pages standard workflow.
Why? Because, as of early March 2022, GitHub Pages (gem version 225) still uses Jekyll =3.9.0
. Papicu needs Jekyll ~>4.1
to take advantage of slugified_categories
(which we rely on for well-formed permalinks).
For those who are really interested, it is possible circumvent this limitation and run Papicu on GitHub Pages by using GitHub Actions. Read Jekyll's official guide on GitHub Actions for the details.
Alternatively, sign up for an account with Netlify and deploy your website with them for free. We did that for our demo page: https://papicu.netlify.app.
If you need help, read A Step-by-Step Guide: Jekyll 4.0 on Netlify.
First, you must install ruby
and bundler
locally. If you are on macOS, read the instructions at lucasrla.github.io/macos-setup/ruby.
Next, make sure bundler
is configured with isolated environments by project:
bundle config set bin bin/
bundle config set path vendor.noindex/
Now, install Jekyll:
bundle install
# and then check if it has been installed properly
bundle info jekyll
Finally, run:
# We are passing `local` as `jekyll.environment` and checking for that inside `default.html`
# to avoid sending analytics events when running locally.
# For more info: https://jekyllrb.com/docs/configuration/environments/
JEKYLL_ENV=local bundle exec jekyll serve
Each example post inside _posts/
demonstrates a few of Papicu features.
Have a look, for example, at the post titled Post containing demos of several features, and make sure you review its source code _posts/2021-02-01-post-with-bells-and-whistles.md
as well.
Papicu takes advantage of jekyll-seo-tag to easily generate relevant metadata tags for search engines and social media.
Twitter Cards, Open Graph and JSON-LD (Google's guide) are supported out-of-the-box.
Please note that jekyll-seo-tag, as of v2.8.0, sets the Twitter Cards to summary_large_image
only if there is an actual image referenced (say, at your post's front-matter). If there is none, it will default to summary
. See, for instance, their issue #287.
Papicu itself is distributed under the terms of the MIT License. Plugins and third-party code have their own licenses. Check them out.
- Code, examples, and inspiration from Jekyll themes Clio and Poole
- Dark mode via Darken
- Privacy-conscious analytics via Shynet
- Table of Contents via jekyll-toc and Gumshoe
- KaTeX support via kramdown, math-katex, and katex-ruby
- Interactive charts via Chart.js
- Sidenotes via @kslstn/sidenotes (blog post)
- Redirects via jekyll-redirect-from
- YouTube embeds via jekyll-youtube
- YouTube lazy loading via dev.to/haggen
- Compressed HTML via jekyll-minifier
- Anchor links via AnchorJS
- Image lightbox via Tobii
- Searchable, sortable, filterable tables and lists via List.js
- And other foundational Jekyll plugins
Papicu means "narrow, elongated pond" in an indigenous language from Brazil. It is also the name of a neighborhood in Fortaleza, a city of northeastern Brazil.