{"id":13718810,"url":"https://github.com/fenneclab/hugo-bin","last_synced_at":"2025-04-05T07:06:52.653Z","repository":{"id":8876291,"uuid":"60016210","full_name":"fenneclab/hugo-bin","owner":"fenneclab","description":"Binary wrapper for Hugo","archived":false,"fork":false,"pushed_at":"2024-05-29T06:55:31.000Z","size":1116,"stargazers_count":88,"open_issues_count":6,"forks_count":27,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-05-29T19:38:52.844Z","etag":null,"topics":["bin-wrapper","hugo","node"],"latest_commit_sha":null,"homepage":"","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/fenneclab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"XhmikosR"}},"created_at":"2016-05-30T14:28:10.000Z","updated_at":"2024-05-31T04:49:27.261Z","dependencies_parsed_at":"2023-10-03T11:18:49.979Z","dependency_job_id":"69b14fae-6378-43f5-b350-8fd9cbc159ad","html_url":"https://github.com/fenneclab/hugo-bin","commit_stats":null,"previous_names":[],"tags_count":266,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenneclab%2Fhugo-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenneclab%2Fhugo-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenneclab%2Fhugo-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenneclab%2Fhugo-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenneclab","download_url":"https://codeload.github.com/fenneclab/hugo-bin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"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":["bin-wrapper","hugo","node"],"created_at":"2024-08-03T01:00:38.102Z","updated_at":"2025-04-05T07:06:52.630Z","avatar_url":"https://github.com/fenneclab.png","language":"JavaScript","funding_links":["https://github.com/sponsors/XhmikosR"],"categories":["Starters"],"sub_categories":["Non-Official"],"readme":"# hugo-bin [![npm version](https://img.shields.io/npm/v/hugo-bin?logo=npm\u0026logoColor=fff)](https://www.npmjs.com/package/hugo-bin) [![Build Status](https://img.shields.io/github/actions/workflow/status/fenneclab/hugo-bin/ci.yml?branch=main\u0026label=CI\u0026logo=github)](https://github.com/fenneclab/hugo-bin/actions?query=workflow%3ACI+branch%3Amain)\n\n\u003e Binary wrapper for [Hugo](https://github.com/gohugoio/hugo)\n\n- hugo-bin supports the [Extended Hugo version](https://github.com/gohugoio/hugo/releases/tag/v0.43)\n- For usage within corporate networks or behind corporate proxies, the download repository can be overwritten\n\nSee [Installation options](#installation-options) for more details.\n\n## Install\n\n```sh\nnpm install hugo-bin --save-dev\n```\n\n## Usage\n\n### API\n\n```js\nimport { execFile } from 'node:child_process';\nimport hugoPath from 'hugo-bin';\n\nexecFile(hugoPath, ['version'], (error, stdout) =\u003e {\n  if (error) {\n    throw error;\n  }\n\n  console.log(stdout);\n});\n```\n\n### CLI\n\n#### Unix\n\n```sh\nnpm exec hugo help\nnpm run create -- post/my-new-post.md # see below 'npm run-script'\n```\n\n#### Windows\n\n```bat\nnpm exec hugo help\nrem see below 'npm run-script'\nnpm run create -- post/my-new-post.md\n```\n\n### npm run-script\n\n```json\n{\n  \"scripts\": {\n    \"build\": \"hugo\",\n    \"create\": \"hugo new\",\n    \"serve\": \"hugo server\"\n  }\n}\n```\n\nSee the [Hugo Documentation](https://gohugo.io/) for more information.\n\n## Installation options\n\n\u003e [!NOTE]\n\u003e You have to run `npm install hugo-bin` to reinstall `hugo-bin` itself if you change any of these options.\n\nhugo-bin supports options to change the variation of Hugo binaries, to overwrite the download repository and the Hugo version.\n\nEach option can be configured in one of the following ways:\n\n### The `hugo-bin` section of your `package.json`\n\n```json\n{\n  \"name\": \"your-package\",\n  \"version\": \"0.0.1\",\n  \"hugo-bin\": {\n    \"buildTags\": \"extended\",\n    \"downloadRepo\": \"https://some.example.com/artifactory/github-releases\",\n    \"version\": \"0.124.1\"\n  }\n}\n```\n\n### As local or global [.npmrc](https://docs.npmjs.com/files/npmrc) configuration file\n\n```ini\nhugo_bin_build_tags = \"extended\"\nhugo_bin_download_repo = \"https://some.example.com/artifactory/github-releases\"\nhugo_bin_hugo_version = \"0.124.1\"\n```\n\n### As environment variables\n\nOn Linux/macOS:\n\n```sh\nexport HUGO_BIN_BUILD_TAGS=\"extended\"\nexport HUGO_BIN_DOWNLOAD_REPO=\"https://some.example.com/artifactory/github-releases\"\nexport HUGO_BIN_HUGO_VERSION=\"0.124.1\"\n```\n\nOn Windows:\n\n```bat\nset HUGO_BIN_BUILD_TAGS=extended\nset HUGO_BIN_DOWNLOAD_REPO=https://some.example.com/artifactory/github-releases\nset HUGO_BIN_HUGO_VERSION=0.124.1\n```\n\n### Options\n\n#### buildTags\n\n- Type: `string`\n- Default: `\"\"`\n\nSet `buildTags` to `extended` to download the [extended version](https://github.com/gohugoio/hugo/releases/tag/v0.43) binary.\n\nIf this is set to `extended` but it's not available for the user's platform, then the normal version will be downloaded instead.\n\n#### downloadRepo\n\n- Type: `string`\n- Default: `\"https://github.com\"`\n\nSet it to your proxy URL to download the hugo binary from a different download repository.\n\n#### hugoVersion\n\n- Type: `string`\n- Default: the version specified in [package.json](package.json)\n\nYou can override the Hugo version here. Please note that if any of the URLs have changed upstream, you might not be able to use\nany version and you will probably need to update to a newer hugo-bin version which takes into consideration the new URLs.\n\n## Supported Hugo versions\n\nSee [the package.json commit history](https://github.com/fenneclab/hugo-bin/commits/main/package.json).\n\n## Super Inspired By\n\n- [mastilver/apex-bin](https://github.com/mastilver/apex-bin)\n- [imagemin/jpegtran-bin](https://github.com/imagemin/jpegtran-bin)\n\n## License\n\n[MIT](LICENSE) © Shun Sato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenneclab%2Fhugo-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenneclab%2Fhugo-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenneclab%2Fhugo-bin/lists"}