{"id":25363886,"url":"https://github.com/criccomini/markupdown","last_synced_at":"2025-04-09T04:41:50.246Z","repository":{"id":276381175,"uuid":"929120734","full_name":"criccomini/markupdown","owner":"criccomini","description":"A static site generator toolkit written in Python","archived":false,"fork":false,"pushed_at":"2025-02-24T23:37:04.000Z","size":118,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T00:28:18.596Z","etag":null,"topics":["blog-engine","liquid-templating-engine","markdown","python","static-site-generator","static-website"],"latest_commit_sha":null,"homepage":"","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/criccomini.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-02-07T21:02:30.000Z","updated_at":"2025-02-24T23:37:07.000Z","dependencies_parsed_at":"2025-02-07T22:23:24.563Z","dependency_job_id":"df712fee-8cce-453e-8872-5d53ab0e73f7","html_url":"https://github.com/criccomini/markupdown","commit_stats":null,"previous_names":["criccomini/markupdown"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criccomini%2Fmarkupdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criccomini%2Fmarkupdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criccomini%2Fmarkupdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criccomini%2Fmarkupdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/criccomini","download_url":"https://codeload.github.com/criccomini/markupdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980822,"owners_count":21027803,"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":["blog-engine","liquid-templating-engine","markdown","python","static-site-generator","static-website"],"created_at":"2025-02-14T22:53:29.507Z","updated_at":"2025-04-09T04:41:50.226Z","avatar_url":"https://github.com/criccomini.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markupdown\n\nMarkupdown is a collection of functions that help you build static sites with [markdown](https://daringfireball.net/projects/markdown/).\n\nMany static site generators are complex, rigid, and rely on plugins for extensibility. Markupdown is the opposite: it's dumb but programmable. It's kind of like a build system for static sites. A typical flow looks like this:\n\n- Stage your `site` directory with markdown, CSS, Javascript, images, and so forth (using `cp`)\n- Transform your files to add metadata to the frontmatter (using functions like `title`, `link`, `blurb`, and so on)\n- Render the markdown with [Liquid](https://shopify.github.io/liquid/) templates (using `render`)\n\nYou can call Markdown's functions any way you like, but I recommend creating a little `build.py` file in your project root:\n\n```python\n#!/usr/bin/env python3\nfrom markupdown import *\n\n# Copy files to the site directory\ncp(\"assets/**/*.*\", \"site\")\ncp(\"content/**/*.md\", \"site\")\n\n# Update markdown frontmatter\ntitle(\"site/**/*.md\")\nlink(\"site/**/*.md\")\nblurb(\"site/**/*.md\")\nsiblings(\"site/**/index.md\")\nchildren(\"site/**/index.md\")\nchangelog(\"content/**/*.md\", \"site\")\nsitemap(\"site/**/*.md\", site_url=\"http://example.com\")\n\n# Render site\nrender(\"site/**/*.md\", site={\"title\": \"My Site\"})\n\n# Minify site HTML, CSS, and JS\nminify(\"site/**/*.html\")\nminify(\"site/**/*.css\")\nminify(\"site/**/*.js\")\n```\n\n## Functions\n\nMarkupdown ships with the following functions:\n\n- `blurb`: Updates the `blurb` field in markdown frontmatter to include a brief summary\n- `changelog`: Updates the `created_at`, `updated_at`, and `change_log` fields in markdown frontmatter\n- `children`: Generates `children` frontmatter for child directories with index.md files\n- `clean`: Deletes the `site` directory\n- `cp`: Copies files to the site directory\n- `feed`: Generates RSS and Atom feeds\n- `init`: Initializes a directory with an example site\n- `link`: Updates the `link` field in markdown frontmatter with the relative URL path\n- `minify`: Minifies HTML, CSS, and JS\n- `references`: Parses markdown for hrefs and generates `references` and `backreferences` frontmatter for markdown files\n- `render`: Renders markdown using Liquid templates\n- `serve`: Starts a local HTTP server with live reload to view the site\n- `siblings`: Generates `siblings` frontmatter that contains paths for sibling markdown files\n- `sitemap`: Generates an XML sitemap\n- `title`: Updates the `title` field frontmatter with the value of the first # h1 or filename\n- `toc`: Generates a table of contents from markdown files\n- `transform`: Applies a transformation function to the frontmatter in markdown files\n\nSee [DOCUMENTATION.md](./DOCUMENTATION.md) for more information.\n\n## Installation\n\n```bash\npip install markupdown\n```\n\nMarkupdown is compatible with Python 3.10 to 3.12\n\n## Usage\n\nAfter you install Markupdown, go to an empty directory and initialize it:\n\n```bash\npython -m markupdown init\n```\n\nThis will create a scaffolding with files and directories like this:\n\n```text\n.\n├── assets\n│   ├── css\n│   │   └── style.css\n│   ├── images\n│   └── js\n├── content\n│   ├── index.md\n│   └── posts\n│       ├── index.md\n│       ├── post1.md\n│       └── post2.md\n├── templates\n│   ├── _footer_.liquid\n│   ├── _head_.liquid\n│   ├── _header_.liquid\n│   ├── _pages_.liquid\n│   └── default.liquid\n├── .gitignore\n└── build.py\n```\n\nRun `./build.py` to generate your site. The output will be in the `site` directory.\n\nMarkupdown comes with a server you can start with:\n\n```bash\npython -m markupdown serve\n```\n\nOpen [http://localhost:8000](http://localhost:8000). You should see your new site.\n\nYou can clean your `site` directory with:\n\n```bash\npython -m markupdown clean\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriccomini%2Fmarkupdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcriccomini%2Fmarkupdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriccomini%2Fmarkupdown/lists"}