Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Hugo blog theme styled with GitHub's Primer CSS, featuring TOC, math support, tags and social sharing.
Hugo-Primer is a Hugo blog theme that restyles the static site generator with GitHub's Primer CSS and adds blog features like TOC, math rendering, and social share buttons.
Hugo-Primer is a Hugo theme built on GitHub's Primer CSS design system, created by developer qqhann. It takes markdown posts with front matter and renders them as a GitHub-style blog with a header menu, sidebar, and content area. The theme is installed by cloning its GitHub repository into a Hugo project's themes directory and runs entirely on Hugo's static generator — no JavaScript build step required.
pygmentsCodeFences = true and pygmentsUseClasses = true.math param or per page via front matter.toc: false.shareTo parameter.Developers and technical writers who prefer GitHub's aesthetic for their personal blogs and want a familiar look. Bloggers publishing in Chinese, Japanese, or Korean benefit from the theme's CJK support, which is enabled with hasCJKLanguage = true. Writers who need to display LaTeX math in posts will appreciate the built-in MathJax integration.
shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"].Install it by running git clone https://github.com/qqhann/hugo-primer.git themes/hugo-primer, then start a local server with hugo server --theme=hugo-primer. You can copy the exampleSite/ directory into your project to get a working configuration quickly. Configuration lives in config.toml, where you set params like hasCJKLanguage, pygmentsCodeFences, and shareTo.
Yes. The theme is open source under the MIT license, so you can use, modify, and distribute it freely.
Yes, the theme supports CJK languages. Setting hasCJKLanguage = true is recommended for Chinese, Japanese, or Korean content, and the example site includes a Japanese article.
Yes. Disqus comments are enabled by default on posts; set comments: false in front matter to hide them on individual pages.
Set showdate: false in the post's front matter to hide the date. The default is true.
Yes. Set math = false site-wide in config.toml and then add math: true to the front matter of individual posts to enable MathJax for those pages only.