{"id":13771999,"url":"https://github.com/tdemin/gmnhg","last_synced_at":"2025-04-14T19:03:33.154Z","repository":{"id":37594496,"uuid":"391470106","full_name":"tdemin/gmnhg","owner":"tdemin","description":"Hugo-to-Gemini Markdown converter","archived":false,"fork":false,"pushed_at":"2023-05-21T14:11:59.000Z","size":142,"stargazers_count":27,"open_issues_count":8,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-20T23:03:36.429Z","etag":null,"topics":["converter","gemini","go","golang","hugo","markdown"],"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/tdemin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2021-07-31T21:50:54.000Z","updated_at":"2024-04-13T00:28:28.000Z","dependencies_parsed_at":"2024-02-09T00:10:52.587Z","dependency_job_id":"6b822a94-4bfb-4840-871f-de764add4fe4","html_url":"https://github.com/tdemin/gmnhg","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdemin%2Fgmnhg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdemin%2Fgmnhg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdemin%2Fgmnhg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdemin%2Fgmnhg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdemin","download_url":"https://codeload.github.com/tdemin/gmnhg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943442,"owners_count":21186958,"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":["converter","gemini","go","golang","hugo","markdown"],"created_at":"2024-08-03T17:00:58.637Z","updated_at":"2025-04-14T19:03:33.123Z","avatar_url":"https://github.com/tdemin.png","language":"Go","funding_links":[],"categories":["Tools"],"sub_categories":["Gemtext converters"],"readme":"# Hugo-to-Gemini converter\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/tdemin/gmnhg)](https://pkg.go.dev/github.com/tdemin/gmnhg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tdemin/gmnhg)](https://goreportcard.com/report/github.com/tdemin/gmnhg)\n[![Push to GHCR](https://github.com/tdemin/gmnhg/actions/workflows/docker.yml/badge.svg)](https://github.com/tdemin/gmnhg/actions/workflows/docker.yml)\n\nThis repo holds a converter of Hugo Markdown posts to\n[text/gemini][Gemtext] (also named Gemtext in this README). The\nconverter is supposed to make people using [Hugo](https://gohugo.io)'s\nentrance to [Project Gemini][Gemini], the alternate web, somewhat\nsimpler.\n\n[Gemini]: https://gemini.circumlunar.space\n[Gemtext]: https://gemini.circumlunar.space/docs/specification.html\n\nThe renderer uses the [gomarkdown][gomarkdown] library for parsing\nMarkdown. gomarkdown has a few quirks at this time, the most notable one\nbeing unable to parse links/images inside other links.\n\nAt this time, gmnhg can convert these Markdown elements to Gemtext:\n\n* paragraphs, converting them to soft wrap as per Gemini spec p. 5.4.1;\n* inline text formatting (bold, emphasis, strikethrough, code,\n  subscript, superscript), which stays in the text to preserve stylistic\n  context;\n* headings;\n* blockquotes;\n* preformatted blocks;\n* tables, displayed as ASCII preformatted blocks;\n* lists (as Gemini doesn't allow lists of level \u003e= 2, those will be\n  reflected with an extra indentation level): ordered, numbered,\n  definition;\n* links and images, rendered as Gemtext links (inline links are rendered\n  after their parent paragraph or other block element in a links block\n  sorted by element type);\n* footnotes, rendered as paragraphs;\n* horizontal rules.\n\nThe renderer will also treat lists of links and paragraphs consisting of\nlinks only the special way: it will render only the links block for\nthem.\n\nTo get a better idea of how source Markdown looks like after the\nconversion to Gemtext, see [testdata](testdata) directory.\n\n[gomarkdown]: https://github.com/gomarkdown/markdown\n\n## gmnhg\n\nThis program converts Hugo Markdown content files from `content/` in\naccordance with templates found in `gmnhg/` to the output dir. It\nalso copies static files from `static/` to the output dir.\n\nFor more details about the rendering process, see the\n[doc](cmd/gmnhg/main.go) attached to the program.\n\n```\nUsage of gmnhg:\n  -output string\n        output directory (will be created if missing) (default \"output/\")\n  -working string\n        working directory (defaults to current directory)\n```\n\n## md2gmn\n\nThis program reads Markdown input from either text file (if `-f\nfilename` is given), or stdin. The resulting Gemtext goes to stdout.\n\n```\nUsage of md2gmn:\n  -f string\n        input file\n```\n\nmd2gmn is mainly made to facilitate testing the Gemtext renderer but\ncan be used as a standalone program as well.\n\n## Site configuration\n\ngmnhg will pick up some attributes such as site title, base URL, and\nlanguage code from your Hugo configuration file (`config.toml`,\n`config.yaml`, or `config.json`). Presently these are used in the\ndefault RSS template.\n\ngmnhg provides a way to override these attributes by defining a\n`gmnhg` section in the configuration file and nesting the attributes\nto override underneath this section. Presently you can override both\n`baseUrl` and `title` in this manner.\n\nFor example, you could add the following to your `config.toml` to\noverride your `baseUrl`:\n\n```\n[gmnhg]\nbaseUrl = \"gemini://mysite.com\"\n```\n\nThis is recommended, as it will ensure that RSS links on your Gemini\nsite use the correct URL.\n\n## License\n\nThis program is redistributed under the terms and conditions of the GNU\nGeneral Public License, more specifically version 3 of the License. For\ndetails, see [COPYING](COPYING).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdemin%2Fgmnhg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdemin%2Fgmnhg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdemin%2Fgmnhg/lists"}