layout: page title: Main Page further_reading:
HAM is a Jekyll-based boilerplate template for generating better, static wiki-style websites. HAM can be instantly used to build static wiki pages. But the best of all, the default theme of HAM can be easily customized to create more personalized wiki pages, unlike those from MediaWiki, for example.
This project is built to replace the current, MediaWiki installation at <hackapedia.reinhart1010.id> after I found out difficult to create custom styles for it, while other, Git-based alternatives such as GitHub Wiki sucks (no, really) and may not support self-hosting on shared hosting providers.
HAM is short for:
HAM ships the default Halfmoon theme by default, which might be considered boring by some. But that's the beauty of it, because HAM supports Halfmoon's CSS variables to play with!
We believe that everyone should be able to theme HAM websites according to their brand and preferences, including us over @reinhart1010 and @1010bots.
{% youtube 0FKaIiRhUME %}
graph TD A[Client] --> B[Load Balancer] B --> C[Server01] B --> D[Server02]
If you would like to add this theme into your GitHub Pages website, please just add the following on your _config.yml
remote_theme: reinhart1010/HAM
Note that this instruction will only work if you still opt in to GitHub Pages' "classic" experience - the same old workflow without having to write your own GitHub Actions. Users who opt in to use GitHub Actions instead should install this as a regular Gem-based theme.
The best part of this is that you can get the latest version of HAM without manually requiring it on your Gemfile, as long as you have updated your page frequently (GitHub will fetch the current available version of the HAM "theme").
HAM is also available as a Gem-based theme on the official Ruby gems repository. If you are unsure on installing gem-based themes like this one, check out the official Jekyll documentation for that.
If you have just created a new site with jekyll new <PATH>
chances are that you're using the default, Minima theme instead of HAM. If that's the case, replace the line which begins with
gem "minima"
on your Gemfile
with
gem "jekyll-ham", "~> 1.1.1"
Also don't forget to change the theme
configuration on your _config.yml
to jekyll-ham
instead of minima
.
jekyll build
?In previous versions of HAM (0.1.5 and earlier), all of your Markdown and HTML files must include the following frontmatter:
---
layout: page
---
However, as of 0.1.6 jekyll-optional-front-matter
has been included and configured by default to remove this requirement, which allows easier content migration for future wikis.
[!IMPORTANT]
BREAKING CHANGE: HAM is currently being upgraded to Halfmoon 2.0, which introduce visual breaking changes. See https://github.com/reinhart1010/HAM/issues/6.
HAM also introduces additional configuration which you can set on your _config.yml
:
ham:
site_icon: https://raw.githubusercontent.com/googlefonts/noto-emoji/main/svg/emoji_u1f969.svg # Your site icon, to be displayed on navbar
site_favicon: null # Your site favicon, in case you have a spare favicon.ico for it
site_meta:
- name: google-site-verification
content: AAAAAA
- name: msvalidate.01
content: BBBBBB
contributing: # Additional metadata for "Contribute to This Page" section on sidebar
discuss: # For "Discuss" (or "Talk page" on MediaWiki)
type: url | custom | commentbox.io | disqus | facebook | giscus | telegram | utterances
url: https://github.com/reinhart1010/HAM/discussions/
view_source_base_url: https://github.com/reinhart1010/HAM/blob/main/ # The base URL to publicly view the original (Markdown) source code
issue_url: https://github.com/reinhart1010/HAM/issues/ # The URL to report an issue related to site or content
Note: You can also override the whole favicon settings (either to entirely remove, or adding mobile or browser-specific icon formats) by overriding _includes/favicon.html
.
HAM currently provides two navigation areas: the navigation bar and the index (as on the sidebar).
You can freely add items in the navigation bar by modifying _includes/navbar.html
, including placing additional nested menus, dialogs/modals, and other HTML tags.
Just like the "On This Page" section, you can add custom sections into the sidebar. Note that the configuration is stored outside the ham
section of _config.yml
(see below example).
ham:
# Other HAM configuration here
data:
index:
- name: "Customise Me"
id: "customize-me"
children:
- name: "Sample Menu 1"
url: "#"
- name: "Sample Menu 2"
url: "#"
- name: "Sample Menu 3"
url: "#"
HAM provides built-in support for Facebook, Giscus, Telegram, and Utteranc.es widgets plugins. However, you can also add your own widgets or links by following these instructions.
If you have a dedicated forum or discussion webpage, such as GitHub Discussions, you can link them directly to all HAM pages by setting Jekyll's _config.yml
as below.
ham:
contributing:
discuss:
type: url
url: https://github.com/reinhart1010/HAM/discussions/
You can use an custom-made comments widget (e.g. JavaScript-based or <iframe>
element) into HAM by placing the code under _includes/custom-comments.html
. You can also use Jekyll-specific variables and attributes including site.title
, site.ham.contributing.issue_url
and page.tags
to render custom widget code.
ham:
contributing:
discuss:
type: custom
To set up CommentBox.io for HAM, follow their installation instructions, and modify the _config.yml
according to the values obtained from the generated HTML snippet.
ham:
contributing:
discuss:
type: commentbox.io
project_id: CommentBox.io Project ID
To set up Disqus for HAM, follow their installation instructions, and modify the _config.yml
according to the values obtained from the generated HTML snippet.
ham:
contributing:
discuss:
type: disqus
forum_shortname: example-forum # Disqus forum shortname, such as `example-forum` from `https://example-forum.disqus.com`.
HAM includes an external JavaScript from Facebook in order to render the Facebook Comments Widget. You are also required to register your website as an app on Facebook, switch from Development Mode to Live/Public Mode, and insert your App ID and preferred language into the configuration below.
ham:
contributing:
discuss:
type: facebook
facebook_app_id: 123456789
lang: en_US
Giscus is yet another comment widget plugin powered by GitHub Discussions. To set up Giscus for HAM, follow their installation instructions, and modify the _config.yml
according to the values obtained from the generated HTML snippet.
ham:
contributing:
discuss:
type: utterances
repo: data-repo
repo_id: data-repo-id
category: data-category
category_id: data-category-id
mapping: data-mapping
reactions_enabled: data-reactions-enabled
emit_metadata: data-emit-metadata
theme: data-theme # "preferred_color_scheme" is preferred to allow HAM's dark mode integration to work smoothly
lang: data-lang
HAM supports for Telegram's @DiscussBot web comments widget. This widget may not sync with comments on Telegram channels set up via discussion groups.
To set up the widget, follow the instructions provided on https://comments.app under your Telegram account, and modify the _config.yml
according to the values obtained from the generated HTML snippet.
ham:
contributing:
discuss:
type: telegram
telegram_discussion: data-telegram-discussion
comments_limit: data-comments-limit # Optional, default: 5
height: data-height # Optional
color: data-color # Optional
dark_color: data-dark-color # Optional
dark: data-dark # Optional, default: 0
DEPRECATED: The value
utteranc.es
has been deprecated, removed, and replaced withutterances
(without the dot).
Utterances is yet another comment widget plugin powered by GitHub Issues. To set up Utterances for HAM, follow their installation instructions, and modify the _config.yml
according to the values obtained from the generated HTML snippet.
ham:
contributing:
discuss:
type: utterances
repo: data-repo
issue_term: issue_term # optional
theme: theme # "preferred-color-scheme" is preferred to allow HAM's dark mode integration to work smoothly
HAM heavily uses Halfmoon CSS framework on the generated page due to its theming flexibility based on CSS variables. However, that comes with a cost: CSS variables are not supported in old browsers. If you're thinking of Internet Explorer 11, well, don't think too far, because this exact feature may not be supported on some smart TV models, too! There are plans to either include a JavaScript-based polyfill or fallback CSS for this, but I might want to do that later.
Copyright (c) 2021-2023 Reinhart Previano Koentjoro.
This project is distributed under MIT License, and also uses the following open-source components: