{"id":46397599,"url":"https://github.com/jdeanwallace/jinjabread","last_synced_at":"2026-03-05T10:12:03.534Z","repository":{"id":228448592,"uuid":"773779201","full_name":"jdeanwallace/jinjabread","owner":"jdeanwallace","description":"A Python-based static site generator using Jinja templates.","archived":false,"fork":false,"pushed_at":"2025-07-15T20:53:53.000Z","size":62,"stargazers_count":95,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T17:44:06.995Z","etag":null,"topics":["jinja","jinja2","jinjabread","markdown","python","static-site-generator"],"latest_commit_sha":null,"homepage":"http://jinjabread.com","language":"Python","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/jdeanwallace.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,"zenodo":null}},"created_at":"2024-03-18T11:39:27.000Z","updated_at":"2025-09-22T20:42:04.000Z","dependencies_parsed_at":"2025-07-14T22:21:02.319Z","dependency_job_id":null,"html_url":"https://github.com/jdeanwallace/jinjabread","commit_stats":null,"previous_names":["jdeanwallace/jinjabread"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jdeanwallace/jinjabread","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeanwallace%2Fjinjabread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeanwallace%2Fjinjabread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeanwallace%2Fjinjabread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeanwallace%2Fjinjabread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdeanwallace","download_url":"https://codeload.github.com/jdeanwallace/jinjabread/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeanwallace%2Fjinjabread/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30118934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T09:35:22.236Z","status":"ssl_error","status_checked_at":"2026-03-05T09:35:20.028Z","response_time":93,"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":["jinja","jinja2","jinjabread","markdown","python","static-site-generator"],"created_at":"2026-03-05T10:12:03.082Z","updated_at":"2026-03-05T10:12:03.517Z","avatar_url":"https://github.com/jdeanwallace.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jinjabread\n\n[![CircleCI](https://img.shields.io/circleci/build/gh/jdeanwallace/jinjabread)](https://circleci.com/gh/jdeanwallace/jinjabread)\n[![GitHub release](https://img.shields.io/github/v/release/jdeanwallace/jinjabread)](https://github.com/jdeanwallace/jinjabread/releases)\n[![PyPI downloads](https://img.shields.io/pypi/dm/jinjabread)](https://pypi.org/project/jinjabread/)\n[![License](https://img.shields.io/:license-mit-blue.svg)](LICENSE)\n\nA Python-based static site generator using Jinja templates.\n\nInspired by [`staticjinja`](https://github.com/staticjinja/staticjinja), [`jekyll`](https://github.com/jekyll/jekyll), and [`hugo`](https://github.com/gohugoio/hugo).\n\n## Install\n\n```bash\npip install jinjabread\n```\n\n## Usage\n\n### Create new site project\n\n```bash\npython -m jinjabread new mysite\n```\n\n### Build site\n\n```bash\npython -m jinjabread build mysite\n```\n\n### Preview site locally\n\n```bash\npython -m jinjabread serve mysite\n# Visit http://127.0.0.1:8000 in your browser.\n```\n\n## Features\n\n- Write pages in Markdown, HTML, or text.\n- Use Jinja2 templating language in Markdown, HTML, or text.\n- Supports YAML metadata in Markdown pages.\n- Keep static media alongside static pages.\n- Index pages (i.e., `index.html`) can list all other pages in the same directory.\n- Preview your static site locally with a built-in web server.\n- Prettify all generated HTML (because why not?)\n\n## File structure\n\n### Important files and directories\n\n| Name              | Description                                                     | Example path |\n| ---               | ---                                                             | --- |\n| Project directory | The project root                                                | `mysite` |\n| Content directory | Contains site content where each file becomes a site page       | `mysite/content` |\n| Layouts directory | Contains page layouts that gets used by the site content        | `mysite/layouts` |\n| Static directory  | Contains static media that gets copied to the output directory  | `mysite/static` |\n| Output directory  | The complete generated site, ready to be hosted                 | `mysite/public` |\n| Config file       | Custom site configurations in TOML format                       | `mysite/jinjabread.toml` |\n\n### Example: Site project structure\n\n```\nmysite/\n├── content\n│   ├── about.html\n│   ├── index.html\n│   └── posts\n│       ├── index.html\n│       ├── my-journey\n│       │   ├── index.html\n│       │   └── profile-photo.jpg\n│       └── my-story.html\n├── jinjabread.toml\n├── layouts\n│   └── markdown.html\n├── public\n│   ├── about.html\n│   ├── index.html\n│   ├── posts\n│   │   ├── index.html\n│   │   ├── my-journey\n│   │   │   ├── index.html\n│   │   │   └── profile-photo.jpg\n│   │   └── my-story.html\n│   └── static\n│       └── style.css\n└── static\n    └── style.css\n```\n\n### Example: File to URL translation\n\n| File path                                     | URL path |\n| ---                                           |----------|\n| `public/index.html`                           | `/` |\n| `public/about.html`                           | `/about` |\n| `public/posts/index.html`                     | `/posts/` |\n| `public/posts/my-story.html`                  | `/posts/my-story` |\n| `public/posts/my-journey/index.html`          | `/posts/my-journey/` |\n| `public/posts/my-journey/profile-photo.jpg`   | `/posts/my-journey/profile-photo.jpg` |\n| `public/static/style.css`                     | `/static/style.css` |\n\n\n## Site config\n\n### Default config\n\n```toml\ncontent_dir = \"content\"\nlayouts_dir = \"layouts\"\nstatic_dir = \"static\"\noutput_dir = \"public\"\nprettify_html = true\n\n[context]\n\n[[pages]]\n  type = \"jinjabread.MarkdownPage\"\n  glob_pattern = \"**/*.md\"\n  layout_name = \"markdown.html\"\n\n[[pages]]\n  type = \"jinjabread.Page\"\n  glob_pattern = \"**/*\"\n```\n\n### Custom config\n\n#### Change output directory\n\n```toml\n# jinjabread.toml\noutput_dir = \"dist\"\n```\n\n#### Add global Jinja context variables\n\n```toml\n# jinjabread.toml\n[context]\n  site_name = \"My site\"\n  url_origin = \"https://mysite.com\"\n```\n\n#### Change Markdown layout file\n\n```toml\n# jinjabread.toml\n[[pages]]\n  type = \"jinjabread.MarkdownPage\"\n  glob_pattern = \"**/*.md\"\n  layout_name = \"post.html\"\n\n[[pages]]\n  type = \"jinjabread.Page\"\n  glob_pattern = \"**/*\"\n```\n\n#### Add page-specific Jinja context variables\n\n```toml\n# jinjabread.toml\n[[pages]]\n  type = \"jinjabread.MarkdownPage\"\n  glob_pattern = \"**/*.md\"\n  layout_name = \"markdown.html\"\n\n[[pages]]\n  type = \"jinjabread.Page\"\n  glob_pattern = \"**/*.txt\"\n\n  [pages.context]\n    foo = \"bar\"\n\n[[pages]]\n  type = \"jinjabread.Page\"\n  glob_pattern = \"**/*\"\n```\n\n## Pages types\n\n| Page type | Keyword arguments |\n| --- | --- |\n| [`jinjabread.Page`](jinjabread/base.py#L71) | - `glob_pattern` |\n| [`jinjabread.MarkdownPage`](jinjabread/base.py#L136) | - `glob_pattern` \u003cbr\u003e - `layout_name` |\n\n### Markdown pages\n\nMarkdown content supports [full YAML metadata](https://github.com/sivakov512/python-markdown-full-yaml-metadata).\n\nFor example, given the following content and layout:\n\n```yaml\n---\n# content/my-blog-post.md\ntitle: My blog post\nauthor: John Smith\ndescription: A very nice story.\nkeywords:\n  - thrilling\n  - must-read\n---\nIt was a cold stormy night...\n```\n\n```html\n\u003c!-- layouts/markdown.html --\u003e\n\u003ch1\u003e{{ title }}\u003c/h1\u003e\n\u003ch2\u003e{{ description }}\u003c/h2\u003e\n\u003ch3\u003eWritten by {{ author }}\u003c/h3\u003e\n\u003cp\u003e{{ content }}\u003c/p\u003e\n```\n\nResults in the following output:\n\n```html\n\u003c!-- public/my-blog-post.html --\u003e\n\u003ch1\u003e\n  My blog post\n\u003c/h1\u003e\n\u003ch2\u003e\n  A very nice story.\n\u003c/h2\u003e\n\u003ch3\u003e\n  Written by John Smith\n\u003c/h3\u003e\n\u003cp\u003e\n  \u003cp\u003e\n    It was a cold stormy night...\n  \u003c/p\u003e\n\u003c/p\u003e\n```\n\n## Context variables\n\n### Default variables\n\nAll pages have these context variables:\n\n| Name | Description | Example value |\n| --- | --- | --- |\n| `url_path` | The URL path of the current page | `/` |\n| `file_path` | The file path of the current page, relative to the output directory | `index.html` |\n\n### Variable precedence\n\nPage-specific context variables override global site context variables.\n\nFor example:\n```toml\n# jinjabread.toml\n[context]\n  fee = \"fie\"\n  foe = \"fum\"\n\n[[pages]]\n  type = \"jinjabread.Page\"\n  glob_pattern = \"**/*.txt\"\n\n  [pages.context]\n    foe = \"foo\"\n\n[[pages]]\n  type = \"jinjabread.Page\"\n  glob_pattern = \"**/*.html\"\n\n  [pages.context]\n    foe = \"bar\"\n```\n\n* `.txt` pages will have the following extra context variables:\n  ```toml\n  fee = \"fie\"\n  foe = \"foo\"\n  ```\n* `.html` pages have the following extra context variables:\n  ```toml\n  fee = \"fie\"\n  foe = \"bar\"\n  ```\n\n### Index pages\n\nAll index pages (i.e., `index.*`) has an extra context variable named `pages` which is list of dictionaries of context variables from its sibling files.\n\nFor example, given the following file structure:\n```\nmysite/content/posts/\n├── index.html\n├── post1.md\n└── post2.md\n```\n\nYou can list all the pages in the `posts` directory using:\n\n```html\n\u003c!-- mysite/content/posts/index.html --\u003e\n{% for page in pages %}\n\u003ca href=\"{{ page.url_path }}\"\u003e\n  {{ page.url_path.split('/') | last | title }}\n\u003c/a\u003e\n{% endfor %}\n```\n\nResulting in:\n\n```html\n\u003c!-- mysite/public/posts/index.html --\u003e\n\u003ca href=\"/posts/post1\"\u003e\n  Post1\n\u003c/a\u003e\n\u003ca href=\"/posts/post2\"\u003e\n  Post2\n\u003c/a\u003e\n```\n\n## Contributing\n\n### Setup\n\n```bash\npython -m venv venv \u0026\u0026 \\\n  . venv/bin/activate \u0026\u0026 \\\n  pip install pip pip-tools --upgrade \u0026\u0026 \\\n  pip-sync requirements.txt\n```\n\n### Test\n\n```bash\npython -m unittest discover .\n```\n\n### Build\n\n```bash\npython -m build\n```\n\n### Release\n\n```bash\nexport TWINE_USERNAME='__token__'\nexport TWINE_PASSWORD='secret-token'\npython -m twine upload dist/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeanwallace%2Fjinjabread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdeanwallace%2Fjinjabread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeanwallace%2Fjinjabread/lists"}