{"id":14981402,"url":"https://github.com/cyrusyip/hugo-theme-yue","last_synced_at":"2026-03-17T01:38:47.319Z","repository":{"id":248609457,"uuid":"780420640","full_name":"CyrusYip/hugo-theme-yue","owner":"CyrusYip","description":"A minimal, multilingual and customizable Hugo theme, suitable for blogging","archived":false,"fork":false,"pushed_at":"2024-10-09T08:47:32.000Z","size":1251,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T22:22:26.144Z","etag":null,"topics":["hugo","hugo-theme","hugo-theme-yue"],"latest_commit_sha":null,"homepage":"https://yue.cyrusyip.org/","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/CyrusYip.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-01T12:53:51.000Z","updated_at":"2024-10-09T08:47:37.000Z","dependencies_parsed_at":"2024-07-19T15:36:11.433Z","dependency_job_id":"96a234c0-ad9a-4348-a2d6-55b74670bcbb","html_url":"https://github.com/CyrusYip/hugo-theme-yue","commit_stats":{"total_commits":205,"total_committers":2,"mean_commits":102.5,"dds":0.004878048780487809,"last_synced_commit":"6876dfd0ed1965b110ee1e04f0d55a3e3cd596dc"},"previous_names":["cyrusyip/hugo-theme-yue"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusYip%2Fhugo-theme-yue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusYip%2Fhugo-theme-yue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusYip%2Fhugo-theme-yue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyrusYip%2Fhugo-theme-yue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyrusYip","download_url":"https://codeload.github.com/CyrusYip/hugo-theme-yue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858318,"owners_count":16556047,"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":["hugo","hugo-theme","hugo-theme-yue"],"created_at":"2024-09-24T14:03:30.289Z","updated_at":"2026-03-17T01:38:47.308Z","avatar_url":"https://github.com/CyrusYip.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yue\n\n**[Demo website](https://yue.cyrusyip.org/)** | [Changelog](CHANGELOG.md)\n\nYue is a minimal, multilingual and customizable Hugo theme, suitable for blogging.\n\n## Screenshots\n\nScreenshots may be outdated, so it's better to visit the [demo website](https://yue.cyrusyip.org/).\n\n\u003cdetails open\u003e\n  \u003csummary\u003eLight mode on desktop\u003c/summary\u003e\n  \n  ![light-desktop](https://cdn.jsdelivr.net/gh/CyrusYip/hugo-theme-yue@images/light-desktop.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDark mode on desktop\u003c/summary\u003e\n  \n  ![dark-desktop](https://cdn.jsdelivr.net/gh/CyrusYip/hugo-theme-yue@images/dark-desktop.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eLight mode on mobile\u003c/summary\u003e\n  \n  ![light-mobile](https://cdn.jsdelivr.net/gh/CyrusYip/hugo-theme-yue@images/light-mobile.png)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDark mode on mobile\u003c/summary\u003e\n  \n  ![dark-mobile](https://cdn.jsdelivr.net/gh/CyrusYip/hugo-theme-yue@images/dark-mobile.png)\n\u003c/details\u003e\n\n\n## Features\n\n- Minimal appearance\n- Easy to install (with Git and Hugo installed, create a website in a few seconds)\n- Detailed documentation\n- Automatic dark mode\n- Multilingual\n    - Translation list in single page\n    - Language selector (go to corresponding page or homepage)\n- Multiple authors\n- Table of Content (foldable, only generated when available)\n- Modification date on home page, single page, section page and term page\n- Custom date format\n- Pagination on home page and section page\n- Full-text RSS\n- Tags and categories\n- Copyright notice (author and year span can be set)\n- RSS link\n- Heading anchor link\n- Mobile-first and responsive\n- Vanilla CSS\n- Search engine optimization\n    - [Microdata](https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata)\n    - meta description\n- [Open Graph](https://ogp.me/)\n- Page count to sections (`/posts/`, `/tags/`, etc.)\n- Customization\n    - Favicon\n    - Styles (CSS)\n    - Contents (HTML)\n\nTo find out all features, check [hugo.yaml](hugo.yaml) (default configuration) and [exampleSite/hugo.yaml](exampleSite/hugo.yaml) (demo site's configuration).\n\n## Get started\n\n### Install\n\nInstall [Git](https://git-scm.com/downloads) and latest [Hugo extended](https://gohugo.io/installation/).\n\n```shell\n# Create website\ngit init my-website\ncd my-website\n# Install theme\ngit submodule add --depth=1 https://github.com/CyrusYip/hugo-theme-yue themes/hugo-theme-yue\ngit commit --message \"add theme\"\n# Create demo content\ncp --recursive themes/hugo-theme-yue/exampleSite/* .\n# Preview\nhugo server\n```\n\nNow we have a working demo webiste. The `content` directory contains the content, and `hugo.yaml` is configuration file. Feel free to play around with them.\n\n### Update theme\n\n```shell\ncd my-website\ngit submodule update --remote\n```\n\nIt's recommended to read [CHANGELOG.md](CHANGELOG.md) before updating the theme.\n\nYou can subscribe updates and the changelog in a feed aggregator (e.g. Inoreader).\n\n- Updates: \u003chttps://github.com/CyrusYip/hugo-theme-yue/commits/main.atom\u003e\n- Changelog: \u003chttps://github.com/CyrusYip/hugo-theme-yue/commits/main/CHANGELOG.md.atom\u003e\n\n### Clone website\n\nYou need to use additional options when you clone your website project.\n\n```shell\ngit clone --recurse-submodules --shallow-submodules git@github.com:your-user-name/my-website.git\n```\n\n### Deploy\n\nAfter setting up the website, you probably want to host it on Internet. There are many methods for doing it, see [Hosting and deployment | Hugo](https://gohugo.io/hosting-and-deployment/). If you don't know what to choose, you can start from Netlify, see [Host on Netlify | Hugo](https://gohugo.io/hosting-and-deployment/hosting-on-netlify/).\n\nMake sure you change baseURL to your domain name (e.g. `https://my-cool-domain.org/`) in `hugo.yaml`.\n\n```diff\n-baseURL: https://yue.cyrusyip.org/\n+baseURL: https://my-cool-domain.org/\n```\n\nRecommended build command:\n\n```shell\nhugo --gc --minify\n```\n\n`--gc` remove unused cache files\n, and `--minify` reduce the size of the website (mainly HTML).\n\n## Usage\n\nCreate a new post.\n\n```\nhugo new content content/en/posts/my-first-post.md\n```\n\nTo learn more about usage, see:\n\n- [Basic usage | Hugo](https://gohugo.io/getting-started/usage/)\n- [Directory structure | Hugo](https://gohugo.io/getting-started/directory-structure/)\n\n## Config\n\nSettings are listed in [exampleSite/hugo.yaml](exampleSite/hugo.yaml) (demo site's config) and [hugo.yaml](hugo.yaml) (default config, imported by the former).\n\nIn the root of your website project, `hugo.yaml` is the config file, which is a copy of [exampleSite/hugo.yaml](exampleSite/hugo.yaml).\n\nTo learn configuration, see [Configure Hugo | Hugo](https://gohugo.io/getting-started/configuration/).\n\n### Multilingual mode\n\nSupported languages:\n\n- `ar`: Arabic\n- `en`: English\n- `fr`: French\n- `zh-CN`: Simplified Chinese\n\nTo create a multilingual website, see [Multilingual mode | Hugo](https://gohugo.io/content-management/multilingual/) and [exampleSite/hugo.yaml](exampleSite/hugo.yaml).\n\nTranslation files are located in the [i18n](i18n) directory and [data/i18n.yaml](data/i18n.yaml). Contributions for additional languages are welcome.\n\nTo contribute a new language:\n\n1. Create a language file (e.g., `fr.yaml` for French) in the [i18n](i18n) directory.\n1. Copy the content of [i18n/en.yaml](i18n/en.yaml) into the new file.\n1. Remove all comments (`# ...`) and translate the content.\n1. Translate the content in [data/i18n.yaml](data/i18n.yaml) as well.\n\nIf you want to keep contributing to translation, you can get latest changes by subscribing the feed of [i18n/en.yaml](i18n/en.yaml) (\u003chttps://github.com/CyrusYip/hugo-theme-yue/commits/main/i18n/en.yaml.atom\u003e) using an RSS reader.\n\n#### Title of tags and categories\n\nIf your website is not in English, you probably want to customize title of `/tags` and `/categories`.\n\nFor example, to customize `/tags` title of `zh-CN` website, create `content/zh-CN/tags/_index.md` and add the following content into the file.\n\n```\n---\ntitle: Chinese Tags\n---\n```\n\n## Customize\n\nYue allows you to customize favicon, styles (CSS), and contents (HTML).\n\n### Favicon\n\nFavicon is the icon next to title in a browser tab. To use your favicon, put `favicon.ico` under `static` directory. You can create `favicon.ico` on online favicon.ico generators.\n\n### Styles (CSS)\n\nStyles are written in CSS. All files are in [assets/css](assets/css). To customize styles, add CSS file(s) to `assets/css/custom/` directory, and subdirectories are supported.\n\nHere is an example of hiding the website title:\n\n```css\n/* assets/css/custom/style/hide-website-title.css */\n.header \u003e h1 {\n  display: none;\n}\n```\n\nThere are a bunch of variables set in [assets/css/theme/variables.css](assets/css/theme/variables.css). You can override these variables.\n\nHere is an example of increasing the content width:\n\n```css\n/* assets/css/custom/variables.css */\n:root {\n  --body-max-width: 800px;\n}\n```\n\nReferences:\n\n- [CSS: Cascading Style Sheets | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS)\n- [Directory structure | Hugo](https://gohugo.io/getting-started/directory-structure/)\n\n### Contents (HTML)\n\nYou can create these files to insert HTML code.\n\n- `layouts/_partials/head/head-start.html`\n- `layouts/_partials/head/head-end.html`\n- `layouts/_partials/page/page-end.html`\n- `layouts/_partials/body/body-end.html`\n\n#### head-start.html\n\n`head-start.html` is added near the start of the `\u003chead\u003e` element.\n\nUse cases:\n\n- Preload scripts\n- Load scripts\n- Load styles\n\nHere is an example of preloading scripts:\n\n```html\n\u003clink rel=\"preload\" as=\"script\" href=\"https://unpkg.com/@swup/head-plugin@2\"\u003e\n\u003clink rel=\"preload\" as=\"script\" href=\"https://unpkg.com/@swup/preload-plugin@3\"\u003e\n\u003clink rel=\"preload\" as=\"script\" href=\"https://unpkg.com/swup@4\"\u003e\n```\n\n#### head-end.html\n\n`head-end.html` is added to the end of the `\u003chead\u003e` element.\n\nUse cases:\n\n- Load scripts\n- Load styles\n\nHere is an example of adding Google Analytics and a local script:\n\n```html\n\u003c!-- Google Analytics --\u003e\n\u003cscript async src=\"https://www.googletagmanager.com/gtag/js?id=G-F46B15BRUF\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n\n  gtag('config', 'G-F46B15BRUF');\n\u003c/script\u003e\n\n\u003c!-- Local script, path: assets/js/my-script.js --\u003e\n{{ with resources.Get \"js/my-script.js\" | js.Build }}\n  \u003cscript defer src=\"{{ .RelPermalink }}\"\u003e\u003c/script\u003e\n{{ end }}\n```\n\n#### page-end.html\n\n`page-end.html` is added to the end of the `\u003cmain\u003e` element in a post.\n\nUse cases:\n\n- comment services, e.g., Disqus and giscus\n\nHere is an example of adding [Giscus](https://giscus.app/):\n\n```html\n{{ $language := \"\" }}\n{{- /*\nWorkaround for lowercase LanguagePrefix,\nsee https://github.com/gohugoio/hugo/issues/9404\n*/ -}}\n{{ if eq site.LanguagePrefix \"/zh-cn\" }}\n  {{ $language = \"zh-CN\" }}\n{{ else }}\n  {{ $language = \"en\" }}\n{{ end }}\n\u003cscript src=\"https://giscus.app/client.js\"\n        data-repo=\"CyrusYip/yue-test\"\n        data-repo-id=\"P_9hJMbXtqr\"\n        data-category=\"General\"\n        data-category-id=\"SIB_ldsflk712ldRsjf7\"\n        data-mapping=\"pathname\"\n        data-strict=\"0\"\n        data-reactions-enabled=\"1\"\n        data-emit-metadata=\"0\"\n        data-input-position=\"bottom\"\n        data-theme=\"preferred_color_scheme\"\n        data-lang=\"{{ $language }}\"\n        crossorigin=\"anonymous\"\n        async\u003e\n\u003c/script\u003e\n```\n\nList of comment services: [Comments | Hugo](https://gohugo.io/content-management/comments/).\n\n#### body-end.html\n\n`body-end.html` is added to the end of the `\u003cbody\u003e` element.\n\nUse cases:\n\n- Dynamically load scripts\n\n## Support\n\nTo report bugs, submit an [issue](https://github.com/CyrusYip/hugo-theme-yue/issues). To ask questions, start a [discussion](https://github.com/CyrusYip/hugo-theme-yue/discussions).\n\n## Further reading\n\nHugo has many features, read [Hugo Documentation](https://gohugo.io/documentation/) to learn.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md).\n\n## Development\n\nThis project uses [hugo-bin - npm](https://www.npmjs.com/package/hugo-bin) to manage Hugo version. Prerequisite: [Node.js](https://nodejs.org/en) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).\n\nClone this repository.\n\n```shell\nnpm install\nnpm run clean:server:shared\n```\n\nThere are other useful commands listed in [package.json](package.json). To use recommended Hugo version, run `npx hugo`.\n\n---\n\nIf you don't have Node.js and npm installed, just install the version listed in [package.json](package.json).\n\n```json\n\"hugo-bin\": {\n  \"buildTags\": \"extended\",\n  \"version\": \"x.yyy.z\"\n},\n```\n\nCHANGELOG.md should be updated in each commit.\n\n## Websites built with Yue\n\nIf you are using Yue and source code of your website is hosted on GitHub, you can add `hugo-theme-yue` topic to your repository.\n\n[Link to `hugo-theme-yue` topic](https://github.com/topics/hugo-theme-yue).\n\n## Acknowledgement\n\nI have learned a lot from many projects. Thank you, developers.\n\n- [hugo-xmin](https://github.com/yihui/hugo-xmin/) (minimal templates)\n- [hugo-theme-jane](https://github.com/xianmin/hugo-theme-jane/) ([RSS template](https://github.com/xianmin/hugo-theme-jane/blob/6bef93b29e96bcf8b5b9a86b94cdd0dce99002bc/layouts/rss.xml#L30))\n- [hugo-theme-zen](https://github.com/frjo/hugo-theme-zen) ([language selector](https://github.com/frjo/hugo-theme-zen/blob/d3b2b6e1eea2bc67b3409238b9c347ab628876da/layouts/partials/language-selector.html))\n- [hugo-theme-gruvbox](https://github.com/schnerring/hugo-theme-gruvbox) (color)\n- [gruvbox](https://github.com/morhetz/gruvbox) (color)\n- [hugo-theme-stack](https://github.com/CaiJimmy/hugo-theme-stack) (source code, documentation and config)\n- [hugo-PaperMod](https://github.com/adityatelange/hugo-PaperMod) (source code, documentation and config)\n\n## License\n\nThis project is licensed under [MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrusyip%2Fhugo-theme-yue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrusyip%2Fhugo-theme-yue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrusyip%2Fhugo-theme-yue/lists"}