New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

silkie

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

silkie

Static site generator with the smoothness of silk

  • 1.0.7
  • PyPI
  • Socket score

Maintainers
1

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:

NameTypeDefaultUsage
slugstringFile pathCustomize the document URL route, e.g. /docs/example.html
titlestringMarkdown title or file nameThe text title of the document. Automatically added at the top of your doc if it does not contain any Markdown title.
descriptionstringThe 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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc