{"id":26090635,"url":"https://github.com/smncd/galette","last_synced_at":"2026-04-18T22:31:37.691Z","repository":{"id":271887818,"uuid":"914471491","full_name":"smncd/galette","owner":"smncd","description":"Docker powered markdown-to-HTML server, built with Starlette and Uvicorn. Mirror of https://gitlab.com/smncd/galette","archived":false,"fork":false,"pushed_at":"2025-01-25T23:20:05.000Z","size":540,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T02:02:44.497Z","etag":null,"topics":["docker","jinja2","markdown","python","starlette","static-site","static-site-generator","uvicorn","webapp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smncd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-01-09T16:57:51.000Z","updated_at":"2025-01-25T23:20:08.000Z","dependencies_parsed_at":"2025-01-25T12:32:58.215Z","dependency_job_id":null,"html_url":"https://github.com/smncd/galette","commit_stats":null,"previous_names":["smncd/galette"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smncd/galette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smncd%2Fgalette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smncd%2Fgalette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smncd%2Fgalette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smncd%2Fgalette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smncd","download_url":"https://codeload.github.com/smncd/galette/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smncd%2Fgalette/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31987719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: 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":["docker","jinja2","markdown","python","starlette","static-site","static-site-generator","uvicorn","webapp"],"created_at":"2025-03-09T09:53:40.299Z","updated_at":"2026-04-18T22:31:37.577Z","avatar_url":"https://github.com/smncd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Galette](./docs/assets/banner.jpg)\n=============================\n\nGalette is a Docker powered Markdown-to-HTML server, built with Starlette and Uvicorn.\n\nWhy does Galette exist? Mostly for fun, and because I'll maybe need it at some point. Guess we'll find out.\n\nGetting started\n---------------\n\nThe easiest way to get going is with Docker. You'll need Docker Compose installed.\n\nCreate a `compose.yaml` file like so:\n```yaml\nservices:\n  galette:\n    image: registry.gitlab.com/smncd/galette\n    ports:\n      - 5000:5000\n    volumes:\n      - /path/to/your/pages/:/pages\n      - /path/to/your/assets/:/assets\n```\n\nAt the path specified in your `compose.yaml` file, create `index.md` (or any other page name, but make sure the name is url friendly):\n```markdown\n\u003c!-- /path/to/your/pages/index.md --\u003e\n\n# Hello world\n\nGalettes are very tasty!\n```\n\nYou can then start the service:\n```bash\ndocker compose up -d\n```\n\nVisit `http://localhost:5000` and you will see your markdown, rendered as HTML.\n\nTemplates and static files\n--------------------------\n\nGalette ships with some default templates, using [Simple.CSS](https://github.com/kevquirk/simple.css), but you will probably want to customize it even further.\n\nTo use custom templates and/or static files, edit your `compose.yaml` from above:\n\n```yaml\nservices:\n  galette:\n    image: registry.gitlab.com/smncd/galette\n    ports:\n      - 5000:5000\n    volumes:\n      - /path/to/your/pages/:/pages\n      - /path/to/your/assets/:/assets\n      - /path/to/your/templates/:/templates # \u003c--- templates folder\n      - /path/to/your/static/:/static # \u003c--- static folder\n```\n\nThe static folder can be used however you want/need, but the templates folder needs at least two files for Galette to be happy:\n\n* `page.jinja2`: The default page template.\n* `404.jinja2`: The 404 page template.\n\n### Different templates\n\nYou can have multiple page templates, and choose which one you want your page to use. Simply create a file in your templates folder, `post.html.jinja2` for example, and put your markup in there. To make a page use this template, add the following to the frontmatter:\n\n```yaml\n---\n# ...\ntemplate: post \n# ...\n---\n```\n\nIf no template is specified, the default, `page`, will be used.\n\n### Tip!\n\nTemplates can have several file extensions. Galette will look for them in the following order:\n\n1. `{name}.html.jinja2`\n2. `{name}.html.jinja`\n3. `{name}.jinja2`\n4. `{name}.jinja`\n5. `{name}.html`\n\nAs you can tell by the file extensions, Galette uses [Jinja2](https://jinja.palletsprojects.com/en/stable/templates/) for templates.\n\nThe frontmatter from your markdown files will be accessible in the templates, along with `html`, which is the body content. \n\nAn example template could end up looking like:\n```html\n\u003c!-- /path/to/your/templates/page.jinja2 --\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003e{{ title }}\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cheader\u003e\n        \u003ch1\u003e{{ title }}\u003c/h1\u003e\n    \u003c/header\u003e\n    \u003cmain\u003e{{ html }}\u003c/main\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nIf we give it this markdown:\n```markdown\n---\n# /path/to/your/pages/pastry.md\ntitle: Flaky pastry\n---\n\nWe love that stuff!\n```\n\nYou'd end up with the following rendered page:\n```html\n\u003c!-- http://localhost:5000/pastry --\u003e\n\u003c!DOCTYPE html\u003e:\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003eFlaky pastry\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cheader\u003e\n        \u003ch1\u003eFlaky pastry\u003c/h1\u003e\n    \u003c/header\u003e\n    \u003cmain\u003e\u003cp\u003eWe love that stuff!\u003c/p\u003e\u003c/main\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nStatic files have the base `/static`, so `/path/to/your/static/main.css` would end up being `http://localhost:5000/static/main.css`.\n\nSome examples are available [here](./docs/examples/)\n\nLicense and Ownership\n---------------------\nCopyright © 2025 Simon Lagerlöf [contact@smn.codes](mailto:contact@smn.codes)   \n\nThis project is licensed under the BSD-3-Clause license - see the [LICENSE](./LICENSE) file for details.\n\nGalette's default templates uses [Simple.CSS](https://github.com/kevquirk/simple.css), licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmncd%2Fgalette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmncd%2Fgalette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmncd%2Fgalette/lists"}