{"id":44343412,"url":"https://github.com/pplmx/h2h","last_synced_at":"2026-02-11T13:11:10.865Z","repository":{"id":187016228,"uuid":"676169402","full_name":"pplmx/h2h","owner":"pplmx","description":"h2h: Hexo to Hugo FrontMatter Converter, or Hugo to Hexo","archived":false,"fork":false,"pushed_at":"2026-01-11T17:51:59.000Z","size":77,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T20:31:20.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pplmx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-08T15:28:17.000Z","updated_at":"2025-10-26T11:16:09.000Z","dependencies_parsed_at":"2023-12-15T09:44:52.983Z","dependency_job_id":"5895b5a8-bef2-432a-9133-89252ceea529","html_url":"https://github.com/pplmx/h2h","commit_stats":null,"previous_names":["pplmx/h2h-go"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pplmx/h2h","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplmx%2Fh2h","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplmx%2Fh2h/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplmx%2Fh2h/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplmx%2Fh2h/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pplmx","download_url":"https://codeload.github.com/pplmx/h2h/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplmx%2Fh2h/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-11T13:11:10.254Z","updated_at":"2026-02-11T13:11:10.860Z","avatar_url":"https://github.com/pplmx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# h2h: Hexo to Hugo FrontMatter Converter\n\n[![CI](https://github.com/pplmx/h2h/workflows/CI/badge.svg)](https://github.com/pplmx/h2h/actions)\n[![Coverage Status](https://coveralls.io/repos/github/pplmx/h2h/badge.svg?branch=main)](https://coveralls.io/github/pplmx/h2h?branch=main)\n\n`h2h` is a CLI tool that facilitates the migration of blogs from Hexo to Hugo and vice versa by converting FrontMatter between the two formats. It processes a directory of Markdown files with either Hexo or Hugo FrontMatter, converts them to the other format, and writes the converted files to a specified destination directory. By default, it converts from Hexo to Hugo using YAML format.\n\n## Features\n\n- Convert between Hexo and Hugo FrontMatter\n- Supports both YAML and TOML formats\n- Directional conversion (`hexo2hugo` or `hugo2hexo`)\n- Logs all conversion activities to a file for easy debugging and monitoring\n\n## Installation\n\nEnsure Go is installed on your system. Use the following command to download and install `h2h`:\n\n```shell\ngo install github.com/pplmx/h2h\n```\n\n## Usage\n\n### Basic Command\n\nTo perform a conversion, specify the source directory (`--src`), destination directory (`--dst`), target FrontMatter format (`--format`: \"yaml\" or \"toml\"), and the conversion direction (`--direction`: “hexo2hugo” or “hugo2hexo”).\n\nExample command to convert Hexo FrontMatter to Hugo FrontMatter in YAML format:\n\n```shell\nh2h --src /path/to/hexo/posts --dst /path/to/hugo/posts\n```\n\n### Options\n\n- `--src`: Source directory containing Markdown files (required)\n- `--dst`: Destination directory for converted Markdown files (required)\n- `--format`: Target FrontMatter format (`yaml` or `toml`) (default: `yaml`)\n- `--direction`: Conversion direction (`hexo2hugo` or `hugo2hexo`) (default: `hexo2hugo`)\n\n### Logging\n\n`h2h` outputs all logs to a file called `h2h.log` in the working directory. This log file contains details of the conversion process, errors, and success messages. This feature is useful for debugging large batch conversions.\n\n### Example Command\n\nConvert from Hugo FrontMatter to Hexo using TOML format:\n\n```shell\nh2h --src /path/to/hugo/posts --dst /path/to/hexo/posts --format toml --direction hugo2hexo\n```\n\n### Handling Errors\n\nIf the conversion fails due to incorrect paths, invalid format, or conversion direction, appropriate error messages will be logged and displayed in the terminal. Check the `h2h.log` file for detailed logs.\n\n## Development\n\nIf you would like to contribute or modify the tool, clone the repository and install dependencies using Go:\n\n```shell\ngit clone https://github.com/pplmx/h2h.git\ncd h2h\ngo build\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplmx%2Fh2h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpplmx%2Fh2h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplmx%2Fh2h/lists"}