Skip to main content

Blog-oriented static website generator using Markdown or reStructuredText.

Project description

Pynfact is a simple static website generator oriented to chronological content, like blogs or websites with historic and sequential data. It allows integration with external scripts, comment engines such as Disqus, TalkYard, etc., or Google Analytics… Theming and configuration is possible by editing Jinja2 templates.

Purpose:

A blog-oriented static website generator

Latest version:

1.3.6 (2025-10-02)

https://badge.fury.io/py/pynfact.svg

Features

  • Input formats: Markdown and reStructuredText

  • Output format: HTML5

  • Configuration: Jinja2 templates

  • Locale support

  • Code syntax highlighting

  • Atom/RSS feed generation

  • Categories and tags

  • Tag cloud

  • Articles and pages

Requirements

docutils (docutils >= 0.1.4):

Python Documentation Utilities.

feedgen (feedgen >= 0.9.0):

Feed Generator (Atom, RSS, Podcasts).

python-dateutil (python-dateutil >= 2.0):

Extensions to the standard Python datetime module.

Jinja2 (jinja2 >= 2.7):

A small but fast and easy to use stand-alone template engine written in pure Python.

Markdown (markdown >= 3.0.0):

Python implementation of Markdown.

Pygments (pygments >= 1.0):

Syntax highlighting package written in Python.

PyYAML (pyyaml >=5.1):

YAML parser and emitter for Python.

Unidecode (unidecode >= 0.4.9):

ASCII transliterations of Unicode text.

Installation

Run:

$ pipx install pynfact

Usage

The interaction is done by command line. Only a few commands are needed:

  1. pynfact --init=<myblog>: Create a folder with all needed content

  2. Go to that directory: cd <myblog>

  3. Configure settings in config.yml, title, name, language…

  4. pynfact --build: Generates the static content

  5. pynfact --serve=localhost: Serves locally to test the results (by default at localhost:4000)

More details at the GitHub project Wiki, and at the Qucikstart guide.

Recent changes

  • Fix bug in arg.parse with option -s (1.3.6)

  • Add option --version (1.3.5)

  • Remove distutils dependency (1.3.4)

  • Add support for mmd extension (MultiMarkdown)

  • Perform tests and upgraded to release candidate version (1.3.1rc2)

  • Parsing read the content input files just once, and not several times

  • Logging errors now can be redirected to stderr, stdout and not only to a file, using the command line --log (or -l)

  • Refactor document parser and metadata gathering

  • Perform tests and upgraded to beta version (1.3.1b1)

  • Add reStructuredText support (docutils)

  • Validate input metadata (titles, and dates if required) in Meta

  • Update setup.py to fix missing dependency PyYAML

  • CLI interface with argparser and more modularized

  • Improve code readability to comply with PEP 8 and PEP 257

  • Generate pages slugs as posts, i.e, from the title, not the filename

  • Add logging support using logging

  • Put every page in the same directory: pages

  • Deploy as Python package at PyPI: https://pypi.org/project/pynfact/

  • Add Esperanto locale (eo)

  • Simplify Builder class constructor, now takes a configuration dictionary, sorted semantically

  • Replace pyatom for feedgen to generate RSS/Atom syndication feeds

Refer to CHANGELOG file for more details.

Why this name?

Granted it will be used on the “web”, the word “log” in Latin may be translated as INdicem FACTorum, hence InFact or -nFact to be more easily pronounceable when prepending the prefix py-, an indicator of the programming language where it has been developed.

Also, pyblog, pyblic, pyweblog and many other cool names were already taken.

Contributing

Bugs

This project is stable, yet still in development, so there are probably lots of bugs that need to be fixed in future releases. If you find a bug, please, report it at the GitHub issue tracker.

License

PynFact! is distributed under the MIT License. Read the LICENSE file embedded in this project for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynfact-1.3.6.tar.gz (96.5 kB view details)

Uploaded Source

File details

Details for the file pynfact-1.3.6.tar.gz.

File metadata

  • Download URL: pynfact-1.3.6.tar.gz
  • Upload date:
  • Size: 96.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pynfact-1.3.6.tar.gz
Algorithm Hash digest
SHA256 47afcce198e0324420e2c4b701b9b144520f97ebb6379bc81507770d8edb8c1b
MD5 640d429ba833729b6092bc9806047390
BLAKE2b-256 0539cd8edb4a9a715aa4ac74e6f888588af0935d281f60fa349f2094b15196b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page