{"id":19236914,"url":"https://github.com/crunchydata/crunchy-hugo-theme","last_synced_at":"2025-04-21T05:32:44.026Z","repository":{"id":53762953,"uuid":"137390559","full_name":"CrunchyData/crunchy-hugo-theme","owner":"CrunchyData","description":"Theme used for Crunchy Data generated documentation","archived":false,"fork":false,"pushed_at":"2023-03-29T17:31:19.000Z","size":9323,"stargazers_count":3,"open_issues_count":12,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-13T18:15:02.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://access.crunchydata.com/documentation/","language":"JavaScript","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/CrunchyData.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":"2018-06-14T17:47:44.000Z","updated_at":"2023-04-22T09:12:36.000Z","dependencies_parsed_at":"2024-11-09T16:37:26.757Z","dependency_job_id":null,"html_url":"https://github.com/CrunchyData/crunchy-hugo-theme","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-hugo-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-hugo-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-hugo-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrunchyData%2Fcrunchy-hugo-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrunchyData","download_url":"https://codeload.github.com/CrunchyData/crunchy-hugo-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250002309,"owners_count":21359092,"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-09T16:24:03.732Z","updated_at":"2025-04-21T05:32:44.015Z","avatar_url":"https://github.com/CrunchyData.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crunchy Hugo Theme\n\nThis repository contains a theme for [Hugo](https://gohugo.io/), based on the [DocDock](http://docdock.netlify.com/) Hugo theme.\n\n# Installation\n\nCheck that your Hugo version is minimum `0.30` with `hugo version`. We assume that all changes to Hugo content and customizations are going to be tracked by git (GitHub, Bitbucket etc.). Develop locally, build on remote system.\n\n## Step 1: Initialize Hugo\n\nYou can set up a new Hugo installation using:\n\n```sh\nhugo new site projectname\n```\n\n## Step 2: Install Crunchy Hugo Theme\n\nThere are a few ways to install the Crunchy Hugo Theme.\n\n### Option 1: git clone\n\n```sh\ncd themes\ngit clone https://github.com/CrunchyData/crunchy-hugo-theme.git themes/crunchy-hugo-theme\n```\n\n### Option 2: Download\n\nDownload from https://github.com/CrunchyData/crunchy-hugo-theme and place the root folder in `themes`\n\n### Option 3: git submodule\n\nIf you are working in a git project you can add the theme as a submodule:\n\n```sh\ngit submodule add https://github.com/CrunchyData/crunchy-hugo-theme themes/crunchy-hugo-theme\n```\n\n## Step 3: Configuration\n\nUse this as the basis for your `config.toml` file:\n\n```toml\nbaseURL = \"\"\ncanonifyurls = true\ndefaultContentLanguage = \"en\"\ndefaultContentLanguageInSubdir= false\nenableMissingTranslationPlaceholders = false\nlanguageCode = \"en-us\"\npublishDir = \"../docs\"\npygmentsCodeFences = true\npygmentsStyle = \"monokailight\"\nrelativeURLs = true\ntheme = \"crunchy-hugo-theme\"\ntitle = \"Your Project Name\"\n\n[params]\neditURL = \"https://github.com/CrunchyData/path/to/project\"\nshowVisitedLinks = false # default is false\nordersectionsby = \"weight\" # ordersectionsby = \"title\"\ndisableHomeIcon = false # default is false\ndisableSearch = false # default is false\ndisableNavChevron = false # set true to hide next/prev chevron, default is false\nhighlightClientSide = false # set true to use highlight.pack.js instead of the default hugo chroma highlighter\nmenushortcutsnewtab = false # set true to open shortcuts links to a new tab/window\nenableGitInfo = true\n\n[outputs]\nhome = [ \"HTML\", \"RSS\", \"JSON\"]\n\n# Add additional URLs to the side nav here\n# [[menu.shortcuts]]\n# pre = \"\u003ch3\u003eMore\u003c/h3\u003e\"\n# name = \"\u003ci class='fa fa-github'\u003e\u003c/i\u003e \u003clabel\u003eGithub repo\u003c/label\u003e\"\n# identifier = \"ds\"\n# url = \"https://github.com/CrunchyData/your-repo\"\n# weight = 10\n#\n# [[menu.shortcuts]]\n# name = \"\u003ci class='fa fa-cloud-download'\u003e\u003c/i\u003e \u003clabel\u003eDownload\u003c/label\u003e\"\n# url = \"https://github.com/CrunchyData/your-repo/releases/download/version/your-repo.2.6.tar.gz\"\n# weight = 11\n```\n\n#### Custom CSS\n\nTo add a custom CSS file to your project to override or add to the global styles, in your `/hugo/data/` directory, create a new configuration file \nnamed `css.toml`. The complete relative path name should resemble `/hugo/data/css.toml`.\n\nInside `css.toml`, a single line of code should be defined:\n\n```sh\nfile = \"main.css\"\n```\n\nwhere `\"main.css\"` is the name of the custom CSS file. The theme will automatically look for this custom CSS file **only** in the `/hugo/static/css/` directory.\n\n# Testing\n\nYou can test your deployment by running the Hugo server module:\n\n```sh\nhugo server\n```\n\nBy deafult, this will make the documentation available at http://localhost:1313 but be sure to read the output to where it binds.\n\n# Deployment\n\nYou can build all the static docs by running:\n\n```sh\nhugo\n```\n\nBy default, this outputs to a documentation directory above the project directory name `docs/`. You can configure this to what makes sense for your project.\n\n# FAQ\n\n## Content Structure\n\nHugo has a few explicit requirements when it comes to content structure.\n\nIf you had a website structure similar to the following:\n\n```sh\nHome\nAbout\n- Meet the Team\nLocation\n- Venue\n- Hotel\nContact Us\n```\nYour Hugo content/ directory would need to resemble the following:\n\n```sh\ncontent/\n-- about/\n-------- meet-the-team.md\n-------- _index.md\n-- location/\n-------- venue.md\n-------- hotel.md\n-------- _index.md\n-- contact-us.md\n-- _index.md\n```\n\nStatic singular side pages can reside in the root of the content/ folder. This would include the contact-us.md file. Any website directories that will contain sub-pages must have their own designated folders with \\_index.md files defined as the root of that subdirectory.\n\nThe \\_index.md file itself at the root of /content is the homepage for the website; it must follow that naming convention for Hugo to recognize it.\n\nIt's possible to define characteristics for each of these pages, such as their weight (to define their order), their website titles, whether or not they should be displayed on the side navigation pane, and so on. This is done using [front matter](https://gohugo.io/content-management/front-matter/).\n\nAn example of this would be the following segment of front matter for `about/_index.md`:\n\n```sh\ntitle: 'About Us'\nweight: 1\ndraft: false\n```\n\nThat segment of code would do the following:\n- set the website title to \"About Us\", as well as the name on the side navigation bar for the subdirectory\n- list \"About Us\" as being the first element on the side navigation\n- tells Hugo that the page is not a draft, and it can be published\n\nIf for some reason a specific page should be excluded from the side navigation, you can add the following to the parameters:\n\n```sh\nhidden: true\n```\n\nMore information on related topics:\n- [Directory Structure](https://gohugo.io/getting-started/directory-structure/)\n- [Content Management](https://gohugo.io/content-management/)\n- [Hugo's Directory Structure Explained](https://www.jakewiesler.com/blog/hugo-directory-structure/)\n\n## Supported File Types\n\nBy default, standalone Hugo supports HTML and Markdown formats (including Blackfriday and Mmark).\n\nUsing external helpers, you can use Asciidoc, reStructuredText, or pandoc using files with the associated extensions. Hugo will call external commands using the relevant helper to generate the content.\n\nSee more information regarding supported file types in Hugo [here](https://gohugo.io/content-management/formats/).\n\n## Printing and PDFs\n\nThe CSS styles for this theme strip out unnecessary content such as the side bar and header when a page is printed.\n\nAs such, PDFs can be printed either through opening the print dialog and selecting \"Save as PDF\", or via traditional command-line conversion methods. For example, if your source content is Markdown, pandoc offers a method of converting from Markdown to PDF, including a Table of Contents:\n\n```sh\npandoc --toc --latex-engine=xelatex source_file dest_file\n```\n\n## Tagged Documentation\n\nThe most straight-forward way to do this is through generating the documentation into different tagged folders into your source branch.\n\nFor example, after using `git tag` to select the desired release,\n\n```sh\nhugo --source=$SOURCE --destination=$DESTINATION\n```\n\nAn example of this using a [gh-pages](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/#enabling-github-pages-to-publish-your-site-from-master-or-gh-pages) branch can be found [here](https://github.com/CrunchyData/crunchy-containers/tree/gh-pages). More information on the publishing process can be found [here](https://gohugo.io/hosting-and-deployment/hosting-on-github/#deployment-of-project-pages-from-your-gh-pages-branch).\n\n## Google Analytics\n\nThere is an option to add specific Google Analytics code snippets. This can be done by adding in a new file (automatically ignored by GitHub, as a security precaution) called `google-analytics.html` in the `/layouts/partials` directory. This will automatically be inserted immediately after the \u003chead\u003e tag through the `baseof.html` file in the `/layouts/_default` directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrunchydata%2Fcrunchy-hugo-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrunchydata%2Fcrunchy-hugo-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrunchydata%2Fcrunchy-hugo-theme/lists"}