{"id":20667897,"url":"https://github.com/statnmap/hugo-statnmap-theme","last_synced_at":"2025-04-19T17:10:12.967Z","repository":{"id":117562993,"uuid":"102182862","full_name":"statnmap/hugo-statnmap-theme","owner":"statnmap","description":"A multilingual template for pages and blog with Hugo","archived":false,"fork":false,"pushed_at":"2025-04-06T16:13:43.000Z","size":2804,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T17:24:47.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/statnmap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-09-02T08:17:40.000Z","updated_at":"2025-04-06T16:13:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"86bbff16-c975-4b62-8c5a-48eae532465c","html_url":"https://github.com/statnmap/hugo-statnmap-theme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statnmap%2Fhugo-statnmap-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statnmap%2Fhugo-statnmap-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statnmap%2Fhugo-statnmap-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statnmap%2Fhugo-statnmap-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statnmap","download_url":"https://codeload.github.com/statnmap/hugo-statnmap-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249746041,"owners_count":21319581,"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":[],"created_at":"2024-11-16T19:45:29.377Z","updated_at":"2025-04-19T17:10:12.961Z","avatar_url":"https://github.com/statnmap.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# StatnMap Hugo theme\n\nStatnMap theme is issued from [hugo-icarus-theme by\ndigitalcraftsman](https://github.com/digitalcraftsman/hugo-icarus-theme),\nbut I thought visual changes were to big to keep it as a fork. This is a\nresponsive and customizable theme for bloggers and freelancers. It’s\noriginally a port of the Icarus theme for [Hexo](//hexo.io) made by\n[Ruipeng Zhang](https://github.com/ppoffice). The theme has been\nrevamped to look like wordpress twenty-fifteen theme.  \nNoteworthy features of this Hugo theme are the integration of a\ncomment-system powered by **Utterances**, **multilingual** support and\n**language switch**, **syntax highlighting** and **code folding** for\nsource code, **how-to-cite card** and **related articles** sections on\nbottom of articles, **contact form** and optional widgets for the\nsidebar.\n\n![](https://github.com/statnmap/hugo-statnmap-theme/raw/master/images/screenshot.png)\n\n*Requires Hugo version \u0026gt; v0.139.2* You can see a live example here:\n\u003chttps://statnmap.com\u003e\n\n## Table of Contents\n\n\u003c!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 --\u003e\n\n-   [Table of Contents](#table-of-contents)\n-   [Get the theme](#get-the-theme)\n-   [Setup](#setup)\n    -   [Comments](#comments)\n    -   [Menu](#menu)\n    -   [Sidebars](#sidebars)\n    -   [Tell me who you are](#tell-me-who-you-are)\n    -   [Widgets](#widgets)\n    -   [Date line](#date-line)\n-   [Multilanguage](#multilingual)\n-   [Contact form](#contact-form)\n-   [Linking thumbnails](#linking-thumbnails)\n-   [Mathematical equations](#mathematical-equations)\n-   [Syntax highlighting](#syntax-highlighting)\n-   [Code Folding](#code-folding)\n-   [Sticky list pages](#sticky-list-pages)\n-   [Gallery shortcode](#gallery-shortcode)\n-   [Citation card](#citation)\n-   [Related articles](#related-articles)\n-   [Website SEO](#website-seo)\n-   [Nearly finished](#nearly-finished)\n-   [Contributing](#contributing)\n-   [License](#license)\n-   [Acknowledgements](#acknowledgements)\n\n## Get the theme\n\nI assume you’ve Git installed. Inside the folder of your Hugo site run\n\n    $ cd themes\n    $ git clone https://github.com/statnmap/hugo-statnmap-theme.git\n\nYou should see a folder called `hugo-statnmap-theme` inside the `themes`\ndirectory that we created a few moments ago. For more information read\nthe official [setup guide](https://gohugo.io/overview/installing/) of\nHugo.\n\n## Setup\n\nNext, navigate to the `exampleSite` folder at\n`themes/hugo-type-theme/exampleSite/`. In order to get your site\nrunning, you need to copy `config.toml` and all the content of all\nrelevant subfolders such as `i18n/en.toml` into the root folders.\n\nTo turn the `exampleSite` folder in a standalone demo site the\n`themesDir` property has been set to `../..`. This way you can preview\nthis theme by running `hugo server` inside `exampleSite` folder.\n\n**Due to the customized `themesDir` path Hugo will fail to find themes\nif you copied the `config.toml` into the root directory of a regular\nHugo website.** Make sure you comment out the `themesDir` property if\nyou use the theme in production.\n\n## The config file\n\nNow, let us take a look into the `config.toml`. Feel free to play around\nwith the settings.\n\n### Comments\n\nThe optional comment system is powered by Utterances. Enter the GitHub repository `\"handle/repo\"` where comments will be synced.\n\n    utteranceGitHubRepo = \"\"\n\nTip: you can disable the comment section for a single page in its\nfrontmatter:\n\n``` toml\n+++\ndisable_comments = true\n+++\n```\n\n### Menu\n\nYou can also define the items menu entries as you like. First, let us\nlink a post that you’ve written. We can do this in the frontmatter of\nthe post’s content file by setting `menu` to `main`.\n\n    +++\n    menu = \"main\"\n    +++\n\nFurthermore, we can add entries that don’t link to posts. Back in the\n`config.toml` you’ll find a section for the menus:\n\n    [[params.menu]]\n        before = true\n        label  = \"Home\"\n        link   = \"/\"\n\nDefine a label and enter the URL to resource you want to link. With\n`before` you can decide whether the link should appear before **or**\nafter all linked posts in the menu. Therefore, `Home` appears before the\nlinked post.\n\n### Sidebars\n\nIn order to use the full width of the website you can disable the\nprofile on the left and / or the widgets on the right for a single page\nin the frontmatter:\n\n``` toml\n+++\ndisable_profile = true\ndisable_widgets = true\n+++\n```\n\n### Tell me who you are\n\nThis theme also provides a profile section on the left. Add your social\nnetwork accounts to the profile section on the left by entering your\nusername under `params.social`. The links to your account will be created\nautomatically.\n\n### Widgets\n\nBeside the profile section you can add widgets on the right sidebar. The\nfollowing widgets are available:\n\n-   recent articles\n-   category list\n-   tag list\n-   tag cloud\n\nYou can deactivate them under `params.widgets`:\n\n    [params.widgets]\n        recent_articles = false\n        categories = true\n        tags = true\n        tag_cloud = true\n\n### Date line\n\nThe date line includes: post date, \\# of words, approximate reading,\ntime tags and categories. However, if you want certain pages to omit the\ndate line, simply put `nodateline = true` in the front matter for that\npage.\n\n### Disable Previous / next article links\n\nTo disable the inclusion of a previous/next article link at the bottom\nof the page, add `noprevnext = true` to the front matter. This feature,\nalong with `nodateline` can be used to create standalone pages that are\nless “blog-like”\n\n## Multilingual\n\nYou don’t blog in English and you want to translate the theme into\ndifferent language? No problem. Take a look in the `i18n` folder and\nyou’ll find a file `en.toml`. It contains all strings related to the\ntheme. Copy this file, change the name so that it reflects the\ntranslation language (like `fr.toml`) and modify the strings needed.\n\nA language switcher is also available with multilingual website\nactivated. You can add png images of flags named ‘lang.png’ in\n‘static/flags’ folder, for new languages other than English and French.\n\nThe `config.toml` file in `exampleSite` proposes menus for a second\nlanguage (French). However, as no posts, itemized or contacts are saved\nwith `.fr.md` extension in this exampleSite, menu items may redirect to\nthe `404 not found` page.\n\nIf you only have one language for your website, you can remove every\n`Languages`, `Languages.en` and `Languages.fr` occurrences. Simple\n`[menu.main]` have to be used instead.\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Contact form\n\nSince this page will be static, you can use formspree.io as proxy to\nsend the actual email. Each month, visitors can send you up to one\nthousand emails without incurring extra charges. Begin the setup by\nfollowing the steps below:\n\n1.  Enter your formspree endpoint with email address under ‘emailservice’ in contact/index.md file\n2.  Fill the other `contactxx` fields in the frontmatter of the contact page\n3.  Send a dummy email yourself to confirm your account\n4.  Click the confirm link in the email from formspree.io\n5.  You’re done. Happy mailing!\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Linking thumbnails\n\nAfter creating a new post you can define a banner by entering the\nrelative path to the image.\n\n    banner = \"banners/placeholder.png\"\n\nCredit: [digitalcraftsman](//github.com/digitalcraftsman)\n\nA thumbnail will be used for the recent\\_articles list in the sidebar as\nwell as in the normal list of articles. If you want a specific thumbnail\ninstead of the banner croped, you can define it by entering the relative\npath to the thumbnail.\n\n    thumbnail = \"banners/thumbnail.png\"\n\nThis way you can store them either next to the content file or in the\n`static` folder.\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Mathematical equations\n\nMathematical equations in form of LaTeX or MathML code can be rendered\nwith the support of [MathJax](https://www.mathjax.org). MathML works out\nof the box. If you’re using LaTeX you need to wrap your equation with\n`$$`.\n\nYou can also print formulas inline. In this case wrap the formula only\nonce with `$`.\n\nIf you don’t need equations, you can disable MathJax but putting\n`disable_mathjax = true` in your config.toml. This will prevent clients\nfrom unnecessarily downloading the MathJax library.\n\nMathJax CDN and versions can be modified in the `config.toml` file:\n\n    MathJaxCDN = \"//cdn.bootcss.com\"\n    MathJaxVersion = \"2.7.1\"\n\n## Syntax highlighting\n\nSyntax highlighting for code is allowed with `highlight.js`. This can be\ndisabled in the `config.toml`. Version, additional languages, CDN and\ntheme can also be modified.\n\n    disable_highlight = false\n    highlightjsVersion = \"9.11.0\"\n    highlightjsCDN = \"//cdn.bootcss.com\"\n    highlightjsLang = [\"r\", \"yaml\"]\n    highlightjsTheme = \"github\"\n\nCredit: [yihui](https//github.com/yihui)\n[statnmap](https://github.com/statnmap)\n\n## Code folding\n\nCode folding is enabled by default with `disable_codefolding = false` in\nparameters of the `config` file. It uses somes javascript libraries of\n[bootstrap](https://getbootstrap.com/docs/3.3/javascript/). Code folding\n(multilingual) buttons only appear when there is code in the document\nrendered from `Rmd` in blogdown. `disable_codefolding` can also be used\nin each article config header. Similarly, you can define if code blocks\nare shown or hidden by default using `codefolding_show = \"hide\"` in the\nconfig file or in each article config.  \nThe list of `\u003cpre\u003e` blocks on which to apply code folding is defined in\nthe `config` file:\n`codeblocks = [\"pre.sourceCode\", \"pre.r\", \"pre.python\"]`\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Sticky list pages\n\nA special kind of posts list is implemented. This allows to show the\nfirst article completely and the other articles as a list with\nsummaries. For that, we use the implemented template\n`list_first_plain_sticky.html` in `partial`. You can use it in two ways:\n\n1.  With Taxonomy This is implemented in the `exampleSite`.\n\n    -   Create a new taxonomy like ‘sticky’:\n\n    \u003c!-- --\u003e\n\n        [Taxonomies]\n          tag = \"tags\"\n          category = \"categories\"\n          sticky = \"stickies\"\n\n    -   Create a folder `layout` \u0026gt; `taxonomy`\n    -   Create a html file named `sticky.html` with this code:\n\n    \u003c!-- --\u003e\n\n        {{ define \"main\" }}\n          {{ if isset .Site.Taxonomies \"sticky\" }}\n            {{ partial \"list_first_plain_sticky\" . }}\n          {{ end }}\n        {{ end }}\n\n    -   Add taxonomy `stickies` in a post or a page. The newest page or\n        the page with `weight = 1` will be shown entirely before the\n        other of the same taxonomy (that will only show a summary). In\n        the exampleSite, pages in `sticky_pages` have this taxonomy.\n\n2.  With special pages\n\n    -   Create a folder `layout` \u0026gt; `sticky_pages` for instance\n    -   Create a html file named `list.html` with this code:\n\n    \u003c!-- --\u003e\n\n        {{ define \"main\" }}\n            {{ partial \"list_first_plain_sticky\" . }}\n        {{ end }}\n\n    -   Create a folder `content` \u0026gt; `sticky_pages` (This is done in\n        the `exampleSite`)\n    -   Add a page. The newest page or the page with `weight = 1` will\n        be shown entirely before the other of the same taxonomy (that\n        will only show a summary)\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Citation\n\nAs for [Radix](https://rstudio.github.io/radix/), a citation field can\nbe added to blog posts. Citation is enabled by default with\n`disable_citation = false` in parameters of the `config` file. It can\nalso be enabled or disabled in each blog post with `disable_citation` in\nthe post YAML / TOML. By default author comes from blog `author` field\nin the article header but `citation_author` overrides this field if\nanother writing is needed. `citation_author` can be specified globally\nin `config` file but also for each blog post.  \nCode is adapted from: Yihan Wu. (2018-12-21). “Blogdown - shortcode for\nradix-like Bibtex”. Retrieved from\n\u003chttps://www.yihanwu.ca/post/blogdown-shortcode-generation-for-bibtex/\u003e.\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Gallery shortcode\n\nThis shortcode you to easily include a gallery into your pages. Copy the\ncode below into your content file and enter the relative paths to your\nimages.\n\n    {{\u003c gallery\n        \"/banners/placeholder.png\"\n        \"/banners/placeholder.png\"\n        \"/banners/placeholder.png\"\n    \u003e}}\n\n## Related articles\n\nYou can define parameters for related articles at the bottom of blog\nposts.\n\n    [related]\n      # Only include matches with rank \u003e= threshold. This is a normalized rank between 0 and 100.\n      threshold = 50\n      # To get stable \"See also\" sections we, by default, exclude newer related pages.\n      includeNewer = true\n      # Will lower case keywords in both queries and in the indexes.\n      toLower = true\n    [[related.indices]]\n    name = \"keywords\"\n    weight = 150\n    [[related.indices]]\n    name  = \"author\"\n    toLower = true\n    weight = 30\n    [[related.indices]]\n    name  = \"tags\"\n    weight = 100\n    [[related.indices]]\n    name  = \"date\"\n    weight = 10\n    pattern = \"2006\"\n\nSee \u003chttps://gohugo.io/content-management/related/\u003e for more\ninformations.\n\nCredit: [statnmap](https://github.com/statnmap)\n\n## Website SEO\n\nThis theme support SEO elements for your website. It was adapted and\nintegrated thanks to the following guide:  \n\u003chttps://keithpblog.org/post/hugo-website-seo/\u003e\n\nIf you wish to enable SEO on this theme, follow these instructions: 1.\nTo include the following parameters in your *config.toml* or\n*config.yaml*\n\n    # .config.toml\n    ...\n    [services]\n      [services.googleAnalytics]\n        id = 'G-XXXXXXXXXX'\n    enableRobotsTXT = true\n    canonifyURLs = true\n    # and if you think your md file names or locations might change:\n    [permalinks]\n        post = \"/blog/:title/\"\n    ...\n\n2.  Add your website to Google Search Console:\n    -   Login to the [Google Search\n        Console](https://www.google.com/webmasters/tools/home)\n    -   Add your website as property\n    -   Add the html page as required by google to verify ownership\n    -   Submit the sitemap (/sitemap.xml) for indexing\n    -   Wait\n3.  Add your website to Bing\n    -   Login to the [Bing Webmaster\n        Console](https://www.bing.com/toolbox/webmaster/)\n    -   Add your site, details and verify\n    -   From the 3 option, we recommend adding the xml file to you\n        website\n\n## Nearly finished\n\nIn order to see your site in action, run Hugo’s built-in local server.\n\n    $ hugo server\n\nNow enter [`localhost:4321`](http://localhost:4321) in the address bar\nof your browser.\n\n## Contributing\n\nHave you found a bug or got an idea for a new feature? Feel free to use\nthe [issue tracker](//github.com/statnmap/hugo-statnmap-theme/issues) to\nlet me know. Or make directly a [pull\nrequest](//github.com/statnmap/hugo-statnmap-theme/pulls).\n\n## License\n\nThis theme is released under the MIT license. For more information read\nthe\n[license](https://github.com/digitalcraftsman/hugo-icarus-theme/blob/master/LICENSE.md).\n\n## Acknowledgements\n\nThanks to\n\n-   [Digitalcraftsman](//github.com/digitalcraftsman/hugo-icarus-theme)\n    for the original Hugo-icarus-theme\n-   [Ruipeng Zhang](//github.com/ppoffice) for creating this theme\n-   [Steve Francia](//github.com/spf13) for creating Hugo and the\n    awesome community around the project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatnmap%2Fhugo-statnmap-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatnmap%2Fhugo-statnmap-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatnmap%2Fhugo-statnmap-theme/lists"}