Skip to main content

Silkie

     __//
cf  /.__.\
    \ \/ /
 '__/    \
  \-      )
   \_____/
_____|_|_____
     " "
 S I L K I E

Chicken ASCII Art

Code style: black pre-commit

Static site generator with the smoothness of silk

Silkie is a simple and smooth static site generator. It can parse text files (".txt") and Markdown files (".md") and generate HTML files from them.

Check out the demo generated from this text file (with help from new.css).

$ silkie -h
Usage: silkie [OPTIONS]

  Static site generator with the smoothness of silk

Options:
  -v, --version          Show the version and exit.
  -h, --help             Show this message and exit.
  -i, --input PATH       Path to the input file/folder  [required]
  -s, --stylesheet TEXT  URL path to a stylesheet
  -l, --lang TEXT        Language of the HTML document [en-CA by default]
  -c, --config FILE      Read option defaults from the specified INI file

Features

  • Generate HTML file(s) from a specified text file/directory
  • Detect the title of a file if it's the first line followed by two blank lines
  • Add custom styling to static site
  • Change HTML document language (<html lang="{your-language}">, en-CA by default)
  • Generate HTML file from a Markdown file (Need Testing)
  • Allow user to supply a JSON formatted configuration file
  • Parse front matter and apply the corresponding metadata fields (Prototype Feature)
    • Check out #21 to see which fields are supported

Installation

$ pip install silkie

Check if you already have installed Silkie:

$ silkie -v

You can also run Silkie as a package:

$ python -m silkie -v

Usage

Input file

$ silkie -i tests/data/text/The Adventure of the Speckled Band.txt

Input directory

$ silkie -i tests/data/text

Custom stylesheet

$ silkie -i tests/data/text/Silver Blaze.txt -s https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css

Custom document language

$ silkie -i tests/data/text/Silver Blaze.txt -l fr

JSON configuration file

$ silkie -c tests/data/config/all_markdown_files.json

Like how you specify the options verbosely for a regular input file, there are keywords can be set in your JSON file: input, lang, and stylesheet

{
    "input": "tests/data/text/Lorem Ipsum.txt",
    "stylesheet": "https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css",
    "lang": "fr"
}

Frontmatter

Supported keywords:

Name Type Default Usage
slug string File path Customize the document URL route, e.g. /docs/example.html
title string Markdown title or file name The text title of the document. Automatically added at the top of your doc if it does not contain any Markdown title.
description string The description of your document, which will added to document metadata for search engine optimization.

Contributing

Please read the Contribution Guide before developing any changes.

License

MIT

Metadata

Release files for silkie 1.0.7

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

Source distribution (sdist)

Source distribution for silkie 1.0.7
File Size Uploaded
silkie-1.0.7.tar.gz 8.6 kB Details

Built distribution (wheel)

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

Total release size: 17.1 kB

Release files / silkie-1.0.7.tar.gz

Download URL silkie-1.0.7.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4487c9544b1563be576ab61d913b0290d5232a623c8bbee843b991f843412701
BLAKE2b-256 checksum
How to use checksums
8fef57d9411d9f7b4062a0bcd383688cc390499c10520fff1688eba66a968ef4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / silkie-1.0.7-py3-none-any.whl

Download URL silkie-1.0.7-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5e93022d508f2e605e1ba85dd2abf40f414523a66ae05e739e149135d2be0e7
BLAKE2b-256 checksum
How to use checksums
58c0dd7288a25fce5d5a05db5b03ebdb31f7eb7f12ec9bd4e7a364c30856e177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.0

2 release files

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