{"id":16023972,"url":"https://github.com/gethinode/mod-csp","last_synced_at":"2025-03-18T03:31:51.776Z","repository":{"id":257812207,"uuid":"868013314","full_name":"gethinode/mod-csp","owner":"gethinode","description":"A Hugo module to generate Content Security Policies for your Hinode site","archived":false,"fork":false,"pushed_at":"2025-03-10T01:42:43.000Z","size":1109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-16T16:44:03.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"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/gethinode.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":"2024-10-05T08:43:05.000Z","updated_at":"2025-03-10T01:42:40.000Z","dependencies_parsed_at":"2024-12-10T02:21:59.801Z","dependency_job_id":"2089c380-c397-49d0-9b46-0b76dc1a4ba3","html_url":"https://github.com/gethinode/mod-csp","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.375,"last_synced_commit":"b9ab4018821b3b7033cff20db95e5b82f7bd423a"},"previous_names":["gethinode/mod-csp"],"tags_count":8,"template":false,"template_full_name":"gethinode/mod-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gethinode%2Fmod-csp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gethinode%2Fmod-csp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gethinode%2Fmod-csp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gethinode%2Fmod-csp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gethinode","download_url":"https://codeload.github.com/gethinode/mod-csp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244150916,"owners_count":20406684,"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-10-08T19:04:56.388Z","updated_at":"2025-03-18T03:31:51.480Z","avatar_url":"https://github.com/gethinode.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hinode Module - Content Security Policies\n\n\u003c!-- Tagline --\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eA Hugo module to generate Content Security Policies for your Hinode site (work in progress)\u003c/b\u003e\n    \u003cbr /\u003e\n\u003c/p\u003e\n\n\u003c!-- Badges --\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://gohugo.io\" alt=\"Hugo website\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/generator-hugo-brightgreen\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://gethinode.com\" alt=\"Hinode theme\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/theme-hinode-blue\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gethinode/mod-csp/commits/main\" alt=\"Last commit\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/gethinode/mod-csp.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gethinode/mod-csp/issues\" alt=\"Issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/gethinode/mod-csp.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gethinode/mod-csp/pulls\" alt=\"Pulls\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues-pr-raw/gethinode/mod-csp.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/gethinode/mod-csp/blob/main/LICENSE\" alt=\"License\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/gethinode/mod-csp\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\n![Logo](https://raw.githubusercontent.com/gethinode/hinode/main/static/img/logo.png)\n\nHinode is a clean blog theme for [Hugo][hugo], an open-source static site generator. Hinode is available as a [template][repository_template], and a [main theme][repository]. This repository generates the site's server headers including content security policies. Visit the Hinode documentation site for [installation instructions][hinode_docs].\n\n## Contributing\n\nThis module uses [semantic-release][semantic-release] to automate the release of new versions. The package uses `husky` and `commitlint` to ensure commit messages adhere to the [Conventional Commits][conventionalcommits] specification. You can run `npx git-cz` from the terminal to help prepare the commit message.\n\n## Configuration\n\nThis module generates the server headers including [Content Security Policies][csp] for a Hinode site. Templates are available for Netlify and the hugo server.\n\nDefine the output files in your site configuration (typically `hugo.toml`). The following example defines two outputs generated in the build folder (usually `public`).\n\n```toml\n[outputFormats]\n  [outputFormats.headers]\n    mediaType = \"application/toml\"\n    baseName = \"netlify\"\n    isPlainText = true\n    notAlternative = true\n    permalinkable = true\n  [outputFormats.server]\n    mediaType = \"application/toml\"\n    baseName = \"server\"\n    isPlainText = true\n    notAlternative = true\n    permalinkable = true\n\n[outputs]\nhome = [\"headers\", \"server\"]\n```\n\nDefine the default (starter) policy in `data/server.toml`.\n\n This module supports the following parameters (see the section `params.headers` in `config.toml`):\n\n| Setting                   | Default | Description |\n|---------------------------|---------|-------------|\n| `headers.\u003coutput\u003e.source` |         | Defines an additional source file to be merged with the output. The source file should be defined in the `data` folder. Supported data formats are `JSON`, `TOML`, `YAML`, and `XML`.\n\nYou can define Content Security Policies for each Hinode module. Hinode will merge these policies for each included module (either `core`, `optional`, or `critical`). Define each directive as an array type. Please refer to the [Quick Reference Guide][csp] for the available directives and supported values.\n\nThe following example defines the policies for `script-src` and `style-src` for the module `example`.\n\n```toml\n[params.modules.example.csp]\n    script-src = [\n        \"//two.com\",\n        \"https:\"\n    ]\n    style-src = [\n        \"'self'\",\n        \"'sha256-456'\"\n    ]\n```\n\n\u003c!-- MARKDOWN LINKS --\u003e\n[hugo]: https://gohugo.io\n[hinode_docs]: https://gethinode.com\n\u003c!-- [module]: https://example.com --\u003e\n[csp]: https://content-security-policy.com\n[repository]: https://github.com/gethinode/hinode.git\n[repository_template]: https://github.com/gethinode/template.git\n[conventionalcommits]: https://www.conventionalcommits.org\n[husky]: https://typicode.github.io/husky/\n[semantic-release]: https://semantic-release.gitbook.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgethinode%2Fmod-csp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgethinode%2Fmod-csp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgethinode%2Fmod-csp/lists"}