Skip to main content

Using Pandoc with Static Site Generators

This library aims to make it easy to write posts in Pandoc's Markdown and build them to static sites with ANY Static Site Generators (SSG) you want. After specifying the directory structure (pandoc4ssg.DirStruct) of your static site (depends on the SSG you used) and options for compiling posts (pandoc4ssg.PostHandler), pandoc4ssg builds the site for you.

Hugo

Below is an example that builds markdown files located in pandoc_posts/ into a Hugo site. See pandoc4ssg-example for details.

import pandoc4ssg

dir_struct = pandoc4ssg.DirStruct(
    tgt_dir_html="content/post",
    tgt_dir_tex="public/tex",
    pandoc_post_dir="pandoc_posts",
    static_tgt=None,
    public="public"
)

post_handler = pandoc4ssg.PostHandler(
    meta_keep = ["title", "subtitle", "author", "date", "categories", "tags"],
    meta_new=[("new_field", True)],
    use_toml=False,
    output_exts=".html",
    output_dir=True,
    pandoc_html_extra_args=['--citeproc'],
    dir_struct=dir_struct
)

pandoc4ssg.build(ssg_cmd="hugo -D", post_handler=post_handler)

Metadata

Release files for pandoc4ssg 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandoc4ssg 0.0.1
File Size Uploaded Provenance Actions
pandoc4ssg-0.0.1.tar.gz 3.7 kB Without provenance Details for pandoc4ssg-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pandoc4ssg 0.0.1
File Interpreter ABI Platform Actions
pandoc4ssg-0.0.1-py3-none-any.whl Python 3 none any Details for pandoc4ssg-0.0.1-py3-none-any.whl

Total release size: 8.2 kB

Release files / pandoc4ssg-0.0.1.tar.gz

Download URL pandoc4ssg-0.0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
66d27031acf844e550e36fab0c034dfbce36ae018ef229123847ca05b1e17897
BLAKE2b-256 checksum
How to use checksums
c3a8d03a9c843b7aada51845a0033483f045a145d4a48e55d81c7afe2fa6c843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release files / pandoc4ssg-0.0.1-py3-none-any.whl

Download URL pandoc4ssg-0.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c75d9b56b39dc49342e27157524bbd798d5bb46847d5e20246c2216871cebba8
BLAKE2b-256 checksum
How to use checksums
e9630f5593b7942891af1f969d20e136f172610fc7dfbc6330092d24caf134e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Security for pandoc4ssg 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page