{"id":18351433,"url":"https://github.com/writefreely/hugo-importer","last_synced_at":"2025-04-06T11:32:33.682Z","repository":{"id":53756634,"uuid":"341340680","full_name":"writefreely/hugo-importer","owner":"writefreely","description":"CLI tool for migrating Hugo content to Write.as/WriteFreely","archived":false,"fork":false,"pushed_at":"2024-10-22T18:57:40.000Z","size":140,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T20:23:48.936Z","etag":null,"topics":["blogging","hugo","import","writefreely"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writefreely.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-02-22T21:21:08.000Z","updated_at":"2024-10-22T18:57:45.000Z","dependencies_parsed_at":"2024-03-18T03:20:26.456Z","dependency_job_id":"25938f4f-830e-4277-818e-0569525112b4","html_url":"https://github.com/writefreely/hugo-importer","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":0.0625,"last_synced_commit":"5a4cf8eb9fa47b47c5b1a8cf78e9bf90638e66c4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writefreely%2Fhugo-importer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writefreely%2Fhugo-importer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writefreely%2Fhugo-importer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writefreely%2Fhugo-importer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writefreely","download_url":"https://codeload.github.com/writefreely/hugo-importer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246990980,"owners_count":20865568,"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":["blogging","hugo","import","writefreely"],"created_at":"2024-11-05T21:31:01.548Z","updated_at":"2025-04-06T11:32:33.341Z","avatar_url":"https://github.com/writefreely.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo-to-WriteFreely Migration Tool\n\nThis command-line tool imports a content-source directory from a [Hugo] site\ninto a WriteFreely instance, including [Write.as].\n\n## Summary\n\n  - [Getting Started](#getting-started)\n  - [Usage](#usage)\n  - [Contributing](#contributing)\n  - [Versioning](#versioning)\n  - [Authors](#authors)\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your\nlocal machine for development and testing purposes. See deployment for notes\non how to deploy the project on a live system.\n\n### Prerequisites\n\nYou'll need to have Go v1.20 or higher installed and available on your\nsystem's `$PATH`. Please refer to the [Go installation instructions] for\ndetailed steps.\n\n### Installing\n\nFirst, start by cloning the project to your local machine:\n\n```bash\ngit clone git@github.com:writefreely/hugo-importer.git\n```\n\nor, if you prefer cloning via HTTPS rather than SSH:\n\n```bash\ngit clone https://github.com/writefreely/hugo-importer.git\n```\n\nThen, install the migration tool:\n\n```bash\ncd hugo-importer\ngo install\n```\n\n## Usage\n\nRun the tool from the root directory of your Hugo site.\n\n```bash\nhugo-importer --user matt --blog my-great-blog --content-dir posts\n```\n\nThe migration tool is interactive; it will prompt you for your password and to\nconfirm that you're ready to proceed, then output each step of the parsing and\npublishing process as they occur.\n\nYour password is not saved anywhere; it's used once to fetch an access token\nthat is used for subsequent requests to the WriteFreely/Write.as API.\n\nPlease review the [limitations](#limitations) below to confirm the migration\ntool will work for your Hugo site.\n\n### Parameters\n\nSome parameters are required, and others only pertain to specific cases.\n\n#### `--user` (or `-u`)\n\n**Required**\n\nThe username for logging into your WriteFreely (or Write.as) account.\n\n#### `--blog` (or `-b`)\n\n**Required**\n\nThe alias of the WriteFreely/Write.as blog that the Hugo posts will be migrated\nto; you can find this from the Blogs page on WriteFreely/Write.as, clicking on\nthe \"Customize\" button for that blog, and checking the **bold** portion in the\n\"URL\" section (\"Preferred URL\" on Write.as).\n\n#### `--content-dir` (or `-c`)\n\n**Required**\n\nThe source directory for the posts you wish to migrate, under `content` in your\nHugo site directory. For example, to import `your-hugo-site/content/posts`, you\nwould set `--content-dir posts`.\n\n#### `--instance` (or `-i`)\n\n**Required for WriteFreely only**\n\nThe WriteFreely instance URL (e.g., `--instance https://pencil.writefree.ly)`;\nleave this out if you're importing into a Write.as account.\n\n#### `--images`\n\n**Only available to Write.as Pro users with Snap.as**\n\nBy adding this flag, the migration tool will attempt to find local images when\nparsing your source content, and upload them from your Hugo site's `static`\ndirectory to [Snap.as].\n\n### Commands\n\n#### `help`\n\nThe above information is available via the `help` command:\n\n```bash\nhugo-importer help\n```\n\n### Output\n\nPosts in the source directory are parsed, added to a queue, and then published\nto the destination blog from the queue. The server's response for each post is\nsanitized of the modification token and saved to a publishing log file in the\nroot directory of your Hugo site.\n\nIf the `--images` flag is set, and the migration tool encounters errors trying\nto upload an image to Snap.as, it will note them in the console output and add\nthem to an `upload-error.log` file in the root directory of your Hugo site.\n\n### Limitations\n\nThe migration tool expects a standard structure where `content` and `static`\ndirectories are one level below the Hugo site's root directory, and that local\nimages are served out of the `static` directory.\n\nThe migration tool will convert _most_ [built-in Hugo shortcodes] into URLs, specifically:\n\n- `gist`\n- `instagram`\n- `tweet`\n- `vimeo`\n- `youtube`\n\nBy converting these to URLs, `gist`, `tweet`, and `youtube` URLs are shown as\nrich embeds for Write.as Pro users.\n\n## Contributing\n\nPlease read the [CONTRIBUTING] documentation for details on how to report bugs,\nsubmit feature requests, and for submitting pull requests.\n\n## Versioning\n\nWe use [SemVer] for versioning. See the [tags on this repository] for versions\nthat are currently available.\n\n## Authors\n\n  - **[Angelo Stavrow]** - *Initial work and documentation*\n\nSee also the list of [contributors] who participated in this project.\n\n\u003c!--references--\u003e\n[Hugo]: https://gohugo.io/\n[Write.as]: https://write.as/\n[Go installation instructions]: https://golang.org/doc/install\n[Snap.as]: https://snap.as\n[built-in Hugo shortcodes]: https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes\n[CONTRIBUTING]: CONTRIBUTING.md\n[SemVer]: http://semver.org/\n[tags on this repository]: https://github.com/writefreely/hugo-importer/tags\n[Angelo Stavrow]: https://github.com/AngeloStavrow\n[contributors]: https://github.com/WriteFreely/hugo-importer/contributors","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritefreely%2Fhugo-importer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritefreely%2Fhugo-importer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritefreely%2Fhugo-importer/lists"}