{"id":21260154,"url":"https://github.com/qqpann/hugo-primer","last_synced_at":"2025-07-11T03:30:58.160Z","repository":{"id":54308247,"uuid":"134553022","full_name":"qqpann/hugo-primer","owner":"qqpann","description":"Hugo theme based on GitHub's Primer CSS","archived":false,"fork":false,"pushed_at":"2023-12-30T13:28:01.000Z","size":1980,"stargazers_count":122,"open_issues_count":13,"forks_count":55,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T19:41:30.259Z","etag":null,"topics":["gohugo","hugo","hugo-blog-theme","hugo-site","hugo-theme","primer","primer-css","theme"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qqpann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-23T10:25:28.000Z","updated_at":"2025-01-02T02:43:28.000Z","dependencies_parsed_at":"2022-08-13T11:40:13.890Z","dependency_job_id":null,"html_url":"https://github.com/qqpann/hugo-primer","commit_stats":null,"previous_names":["qqhann/hugo-primer"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/qqpann/hugo-primer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqpann%2Fhugo-primer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqpann%2Fhugo-primer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqpann%2Fhugo-primer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqpann%2Fhugo-primer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qqpann","download_url":"https://codeload.github.com/qqpann/hugo-primer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqpann%2Fhugo-primer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721295,"owners_count":23653915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gohugo","hugo","hugo-blog-theme","hugo-site","hugo-theme","primer","primer-css","theme"],"created_at":"2024-11-21T04:17:09.057Z","updated_at":"2025-07-11T03:30:57.804Z","avatar_url":"https://github.com/qqpann.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo-Primer\n\n**A simple and beautiful Hugo theme based on GitHub's Primer CSS** | **[日本語記事](https://qqhann.dev/blog/theer-stroy/)**\n\nThis theme would be a perfect fit if you are used to GitHub style pages.  \nHugo-Primer is a theme based on GitHub style css: Primer, and adds some blog like features onto it.\n\nTry it now, and leave me a star if you like it!\n\n![screenshot](https://github.com/qqhann/hugo-primer/blob/master/images/screenshot.png)\n\n## Features\n\n- [x] Primer css like theme\n- [x] Menu bar header\n- [x] Colored code pen\n- [x] Math inline\n- [x] Awesome TOC\n- [x] Tags \u0026 Categories\n- [x] Social Share buttons\n\n## Installation\n\nClone to your theme directory:\n\n```terminal\ngit clone https://github.com/qqhann/hugo-primer.git themes/hugo-primer\n\nhugo server --theme=hugo-primer\n```\n\n## Usage\n\n### exampleSite\n\nYou can refer to `exampleSite/` to get started.\nReading `exampleSite/_index.md` is good too.\n\nFor a quick start:\n\n```sh\ncp -av themes/hugo-primer/exampleSite/* .\n```\n\n### Customizing\n\n#### config.toml\n\nYou can configure Hugo-Primer behavior with these params in your blog's `config.toml`. Shown are defaults and most recommended configs.\n\n```config.toml\n# config.toml\n\nhasCJKLanguage = true\n# Code pen\npygmentsCodeFences = true\npygmentsUseClasses = true\n\n# Enter a copyright notice to display in the site footer.\n# To display a copyright symbol, type `\u0026copy;`.\ncopyright = \"\"\n\n[params]\n# Chose Social Sharing Buttons you want to use.\nshareTo = [\"Twitter\", \"Hatena\", \"Facebook\", \"Pocket\"]\n# You may disable copyright sentence by setting this to false.\nshowFooterCredits = true\n```\n\nThat being said, below is all recommended configuration example.\n\n```config.toml\n# config.toml\n\nbaseURL = \"https://your_web_site\"\ntitle = \"Your Blog\"\ntheme = \"hugo-primer\"\nlanguageCode = \"ja\"\n# If you are using Chinese, Japanese, or Korean, I highly recommend you to set this true.\nhasCJKLanguage = true\nsummaryLength = 70\n# Code pen\npygmentsCodeFences = true\npygmentsUseClasses = true\ngoogleAnalytics = \"U-12345678-0\"\n\n# Enter a copyright notice to display in the site footer.\n# To display a copyright symbol, type `\u0026copy;`.\ncopyright = \"\u0026copy;Your Name 2019\"\n\n[frontmatter]\n# update sitemap.xml's lastmod datetime by file change time, instead of git.\nlastmod = [\"lastmod\", \":fileModTime\", \":default\"]\n\n[params]\ndescription = \"Describe what your web page is about\"\ntwitter = \"your_twitter_id\"\n# You can use favicon by adding `favicon-64.png` to `static` directory.\n# You can also add `apple-touch-icon.png` and `pinned-icon.svg`.  \nuseIcon = true\nuseTwitterCard = true\n# Use MathJax.js. Disabling site-wide and you still can enable in indivisual pages\nmath = true\n\nshareTo = [\"Twitter\", \"Hatena\", \"Facebook\", \"Pocket\"]\nshowFooterCredits = true\n```\n\n#### archetypes/default.md\n\nIt is also recommended to remove your site's `archetypes/default.md`, or copy Hugo-Primer's `archetypes/default.md` to your site.\n\n```archetypes/default.md\n---\ntitle: \"{{ replace .Name \"-\" \" \" | title }}\"\ndate: {{ .Date }}\ndraft: true\ncategories:\ntags:\nkeywords:\n---\n```\n\n#### page-level params\n\nhugo-primer also comes with some custom page level parameters\n\n- __showDate__ (default: __true__)  \nshows the date on a post\n\n- __comments__ (default: __true__)  \nsetting to false will hide disqus comments\n\n- __toc__ (default: __true__)  \ndisplay the table of contents\n\n- __categories__ (default: __an empty list__)  \na list of categories to display in the sidebar\n\n- __tags__ (default: __an empty list__)  \na list of tags to display in the sidebar\n\n- __math__ (default: __false__)  \nIf math.js is disabled for the site you can use this setting to enable it for a single page\n\n- __keywords__ (default: __an empty list__)  \nThis adds a metatag to the page for listing keywords. This can be useful for SEO. \n\n\nExample usage where the defaults are overridden:\n\n```md\n---\nshowdate: false\ncomments: false\ntoc: false\ncategories:\n- Diary\ntags:\n- Shopping\n- Health\nmath: true\nkeywords:\n- Cheese\n- Milk\n---\n```\n\n\n#### ruby annotation\n\n[ruby annotation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby) allows you to show pronunciation of characters. Ruby in hugo-primer is like this:\n\n![ruby](https://github.com/qqhann/hugo-primer/blob/master/images/ruby.png)\n\nYou just need one line shortcodes code:\n\n```html\n{{\u003c ruby rb=\"深表遗憾\" rt=\"Xi Wen Le Jian\" \u003e}}\n\n{{\u003c ruby rb=\"My heart is broken.\" rt=\"I'm happy for that.\" \u003e}}\n```\n\n## Contributing\n\nIssues and PRs are welcome. :)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqqpann%2Fhugo-primer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqqpann%2Fhugo-primer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqqpann%2Fhugo-primer/lists"}