{"id":13560995,"url":"https://github.com/marccampbell/hugo-linkcheck-action","last_synced_at":"2025-08-18T13:34:16.505Z","repository":{"id":36511042,"uuid":"169022914","full_name":"marccampbell/hugo-linkcheck-action","owner":"marccampbell","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-12T05:02:06.000Z","size":3370,"stargazers_count":27,"open_issues_count":27,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T06:17:40.936Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marccampbell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2019-02-04T03:31:30.000Z","updated_at":"2024-07-22T22:52:17.000Z","dependencies_parsed_at":"2024-01-14T02:52:23.636Z","dependency_job_id":"c377792b-899c-4ae1-b721-3a023fb2b473","html_url":"https://github.com/marccampbell/hugo-linkcheck-action","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marccampbell%2Fhugo-linkcheck-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marccampbell%2Fhugo-linkcheck-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marccampbell%2Fhugo-linkcheck-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marccampbell%2Fhugo-linkcheck-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marccampbell","download_url":"https://codeload.github.com/marccampbell/hugo-linkcheck-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230238716,"owners_count":18195082,"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-08-01T13:00:51.481Z","updated_at":"2024-12-18T08:19:23.836Z","avatar_url":"https://github.com/marccampbell.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"# Hugo Link Check GitHub Action\n\nBuilds a Hugo site and validates that there are no broken links in the site. Any broken links will be reported as a comment on the pull request.\n\nThis Action uses the [stevenvachon/broken-link-checker](https://github.com/stevenvachon/broken-link-checker) module to crawl and report broken links.\n\n### Quick Start\n\nAdd a new [GitHub Action](https://github.com/features/actions) to your repo. You can create a file named `.github/main.workflow` and use this as a quick start:\n\n```hcl\nworkflow \"Hugo Link Check\" {\n  resolves = \"linkcheck\"\n  on = \"pull_request\"\n}\n\naction \"filter-to-pr-open-synced\" {\n  uses = \"actions/bin/filter@master\"\n  args = \"action 'opened|synchronize'\"\n}\n\naction \"linkcheck\" {\n  uses = \"marccampbell/hugo-linkcheck-action@v0.1.3\"\n  needs = \"filter-to-pr-open-synced\"\n  secrets = [\"GITHUB_TOKEN\"]\n  env = {\n    HUGO_FINAL_URL = \"https://mysite.com\"\n  }\n}\n```\n\n### Environment Variables\n\nThe following environment variables can be set to override defaults:\n\n| Name | Default Value | Description |\n|------|---------------|-------------|\n| HUGO_ACTION_COMMENT | \"true\" | Set to \"true\" or \"1\" to post a comment back on the pull request |\n| HUGO_STARTUP_WAIT | 15 | The number of seconds to wait `hugo serve` to be ready |\n| HUGO_EXCLUSIONS_LIST | `.github/hugo-linkcheck-actions/exclusions.json` | The path to an optional file that lists exclusions |\n| HUGO_CONFIG | `./config.toml` | Path to the config.toml to use when running the site. Relative to the root of the repo |\n| HUGO_ROOT | `.` | Path to the Hugo site root, relative to the repo root |\n| HUGO_CONTENT_ROOT | `./content` | Path to the Hugo content directory, relative to the repo root |\n| HUGO_FINAL_URL | `http://localhost:1313` | URL to show in the diff (and link to) |\n\nTo set any of these parameters in your action, edit the \"linkcheck\" action step to pass these variables. For example, a main.workflow that sets a few of these would look like:\n\n```hcl\nworkflow \"Hugo Link Check\" {\n  resolves = \"linkcheck\"\n  on = \"pull_request\"\n}\n\naction \"filter-to-pr-open-synced\" {\n  uses = \"actions/bin/filter@master\"\n  args = \"action 'opened|synchronize'\"\n}\n\naction \"linkcheck\" {\n  uses = \"marccampbell/hugo-linkcheck-action@v0.1.3\"\n  needs = \"filter-to-pr-open-synced\"\n  secrets = [\"GITHUB_TOKEN\"]\n  env = {\n    HUGO_CONFIG = \"./configs/local.toml\"\n    HUGO_ROOT = \"./hugo\"\n    HUGO_FINAL_URL = \"https://mysite.com\"\n  }\n}\n```\n\n### Excluding URLs\n\nSometimes, it makes sense to exclude some URLs from the broken link checker. This GitHub Action supports reading a file from the repository that contains a list of domain names or paths to exclude from the action. By default, this file is `.github/hugo-linkcheck-action/exclusions.json`. You can change this path by setting the environment variable `HUGO_EXCLUSIONS_LIST`, as documented in the table above.\n\nThis file should be a list of paths to exclude, and an example is:\n\n```\n[\n  \"server:8800\",\n  \"microsoft.com\",\n  \"help.mycompany.com/community/profile\"\n]\n```\n\n### Directories\n\nThis GitHub Action doesn't make any assumptions about how your Hugo site is set up. There are sane defaults, which should work if you have a single Hugo site, running a relatively normal setup. But if you have a more custom Hugo setup, with various config.toml/yaml files, or content in a differerent directory than standard, use the environment variables when setting up your action.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarccampbell%2Fhugo-linkcheck-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarccampbell%2Fhugo-linkcheck-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarccampbell%2Fhugo-linkcheck-action/lists"}