{"id":14981431,"url":"https://github.com/cloudcannon/cloudcannon-hugo","last_synced_at":"2025-10-29T05:31:39.363Z","repository":{"id":57200724,"uuid":"299155968","full_name":"CloudCannon/cloudcannon-hugo","owner":"CloudCannon","description":":electric_plug: Generates a JSON file for CloudCannon to create an editing interface from a site built with Hugo.","archived":false,"fork":false,"pushed_at":"2024-04-22T03:17:56.000Z","size":935,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-23T05:01:33.011Z","etag":null,"topics":["cloudcannon","cms","hugo","ssg","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CloudCannon.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-09-28T01:37:15.000Z","updated_at":"2024-04-23T05:01:33.012Z","dependencies_parsed_at":"2023-02-10T18:46:33.322Z","dependency_job_id":"f579447d-177a-421f-aa64-e01b53d57675","html_url":"https://github.com/CloudCannon/cloudcannon-hugo","commit_stats":{"total_commits":252,"total_committers":7,"mean_commits":36.0,"dds":"0.22619047619047616","last_synced_commit":"f8bf0b91e8ce0bc33aa3369fe60fded26f23b5a5"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Fcloudcannon-hugo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Fcloudcannon-hugo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Fcloudcannon-hugo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudCannon%2Fcloudcannon-hugo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CloudCannon","download_url":"https://codeload.github.com/CloudCannon/cloudcannon-hugo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238777795,"owners_count":19528813,"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":["cloudcannon","cms","hugo","ssg","static-site-generator"],"created_at":"2024-09-24T14:03:33.745Z","updated_at":"2025-10-29T05:31:39.357Z","avatar_url":"https://github.com/CloudCannon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudCannon Hugo\n\nCreates [CloudCannon](https://cloudcannon.com/) build information for sites made with Hugo.\n\nThis tool runs after your Hugo build, reading your configuration to find pages, collections, and\ndata files to create a JSON file used to automatically integrate the site with CloudCannon. This\nJSON file is written to `_cloudcannon/info.json` in your destination folder.\n\n[\u003cimg src=\"https://img.shields.io/npm/v/cloudcannon-hugo?logo=npm\" alt=\"version badge\"\u003e](https://www.npmjs.com/package/cloudcannon-hugo)\n[\u003cimg src=\"https://img.shields.io/npm/dt/cloudcannon-hugo\" alt=\"downloads badge\"\u003e](https://www.npmjs.com/package/cloudcannon-hugo)\n[![Build Status](https://travis-ci.com/CloudCannon/cloudcannon-hugo.svg?branch=master)](https://travis-ci.com/CloudCannon/cloudcannon-hugo)\n[![codecov](https://codecov.io/gh/CloudCannon/cloudcannon-hugo/branch/master/graph/badge.svg?token=HZJBYKA8ZF)](https://codecov.io/gh/CloudCannon/cloudcannon-hugo)\n\n***\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Development](#development)\n- [License](#license)\n\n***\n\n## Installation\n\n**You don't have to install anything** when building on CloudCannon. This tool is automatically\ninstalled before your site is built. This gives you the latest support, new features, and fixes\nas they are released.\n\nAlthough **not necessary**, you can install the tool locally to debug an integration issue.\n\n\u003cdetails\u003e\n\u003csummary\u003eManual installation steps\u003c/summary\u003e\n\n\u003cblockquote\u003e\n\n```sh\n$ npm install --global cloudcannon-hugo\n```\n\nThis gives you access to the `cloudcannon-hugo` binary.\n\n\u003c/blockquote\u003e\n\u003c/details\u003e\n\n\n## Configuration\n\nConfiguration files should be in the root directory (or the same directory you run\n`cloudcannon-hugo`). The first supported file found in this order is used:\n\n- `cloudcannon.config.json`\n- `cloudcannon.config.yaml`\n- `cloudcannon.config.yml`\n- `cloudcannon.config.js`\n- `cloudcannon.config.cjs`\n\nAlternatively, use a specific file with the `CLOUDCANNON_CONFIG_PATH` environment variable:\n\n```sh\n$ CLOUDCANNON_CONFIG_PATH=src/cloudcannon.config.js cloudcannon-hugo\n```\n\nYour global CloudCannon configuration is set in this file as well, as it's used as a base to\ngenerate `_cloudcannon/info.json` (used to integrate your site with CloudCannon).\n\nExample content for `cloudcannon.config.yml`:\n\n```yaml\n# Global CloudCannon configuration\n_inputs:\n  title:\n    type: text\n    comment: The title of your page.\n_select_data:\n  colors:\n    - Red\n    - Green\n    - Blue\n\n# Base path to your site source files\nsource: src\n\n# The subpath your built output files are mounted at\nbase_url: /documentation\n\n# Populates collections for navigation and metadata in the editor\ncollections_config:\n  people:\n    # Base path for files in this collection, relative to source\n    path: content/people\n\n    # Whether this collection produces output files or not\n    output: true\n\n    # Collection-level configuration\n    name: Personnel\n    _enabled_editors:\n      - data\n  posts:\n    path: _posts\n    output: true\n  pages:\n    name: Main pages\n\n# Generates the data for select and multiselect inputs matching these names\ndata_config:\n  # Populates data with authors from an data file with the matching name\n  authors: true\n  offices: true\n\npaths:\n  # The default location for newly uploaded files, relative to source\n  uploads: assets/uploads\n\n  # The path to site data files, relative to source\n  data: _data\n\n  # The path to site layout files, relative to source\n  layouts: _layouts\n```\n\nSee the [CloudCannon documentation](https://cloudcannon.com/documentation/) for more information\non the available features you can configure.\n\nConfiguration is set in `cloudcannon.config.*`, but the tool also automatically\nreads and processes the following from Hugo if unset:\n\n- `collections_config` from your folder structure inside `contentDir` in Hugo config\n- `paths.layouts` from `layoutsDir` in Hugo config\n- `paths.data` from `dataDir` in Hugo config\n- `paths.static` from `staticDir` in Hugo config\n- `base_url` from the `--baseURL` CLI option or `baseURL` in Hugo config\n- `source` from `source` in Hugo config\n\n## Development\n\nInstall dependencies:\n\n```sh\n$ npm i\n```\n\nLint code:\n\n```sh\n$ npm run lint\n```\n\n### Testing\n\nRun tests:\n\n```sh\n$ npm test\n$ npm run test:integration\n$ npm run test:all\n$ npm run report-coverage\n```\n\nLink this package locally to test it on a site folder, then run it within your site folder:\n\n```sh\n$ npm link\n$ cd ../my-hugo-site\n$ cloudcannon-hugo\n```\n\n### Releasing new versions\n\nPrerelease:\n\n```sh\n$ npx np prerelease --tag=next\n```\n\nRelease:\n\n```sh\n$ npx np\n```\n\n## License\n\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcannon%2Fcloudcannon-hugo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudcannon%2Fcloudcannon-hugo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcannon%2Fcloudcannon-hugo/lists"}