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.2 (2020-08-05)

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:

$ pip install pynfact

(If your default version of Python is 2.x, maybe you need to type pip3 instead of pip)

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

  • 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 still in development, so there are probably lots of bugs that need to be fixed before deploying a stable release. 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 embeeded 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.2.tar.gz (66.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pynfact-1.3.2.tar.gz
  • Upload date:
  • Size: 66.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for pynfact-1.3.2.tar.gz
Algorithm Hash digest
SHA256 beb05c5e62094545a54f0f6c42761935b99159ab52f04d60d8c5bb1af704c302
MD5 8e17cf2e2aa84bdf27ce6d31e6aa0b1b
BLAKE2b-256 cf3cd39a914009ff0f6e48c9d385f266d866cf3420ebe6362a37b690fd7cd53c

See more details on using hashes here.

Supported by

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