A static website generator for people who enjoy the simpler things in life.

Overview

Ivy

Ivy is a static website generator built in Python. It's small, elegant, and simple to use.

Comments
  • review request: Ivy theme

    review request: Ivy theme

    I've created an Ivy theme called mccole in https://github.com/gvwilson/theme/, and would be very grateful for feedback. In particular, there are several places in the extensions where I check to see if the node argument is empty, and if so, bail out; this tells me that I'm triggering on the wrong event, but I don't know which one(s) to watch for instead.

    Similarly, the theme creates lookup tables under ivy.site.config["mccole"] for its own use; in several places one extension checks to see if another extension has added information there yet or not, and if not, bails out - my instinct is that shouldn't be necessary if I listen for another event.

    Finally:

    1. I tried to get attribute lists working with tables, but the Markdown parser doesn't seem to recognize them (see the example at the top of lib/mccole/extensions/tables.py). If there's a way to do this, I'd be very happy to rewrite the extension.
    2. I'm using a regular expression to find headings in pages rather than running the Markdown parser and searching the token stream (partly because I suspect it's faster, but also because I'm not familiar with Markdown's parsing cycle). If there's an easier way to do this, I'd be happy to rewrite to use it.

    And thanks for documenting Ibis and shortcodes - they were easy to figure out.

    p.s. it's my intention to use this theme (with better CSS) for https://teachtogether.tech/, https://stjs.tech/, and https://buildtogether.tech/ - all of the features are driven by those books' needs. I'm speaking with the https://pagedjs.org/ folks later this week to see about HTML-to-PDF generation as well.

    opened by gvwilson 9
  • copying files without templates

    copying files without templates

    I'm building an extension to include snippets of code in HTML pages. I'd like to store the snippets in the same directories as the page files, i.e., src/a/index.md will include src/a/one.py, src/a/two.py, and so on - it's easier to keep track of them this way than creating res/a/one.py, res/a/two.py, and so on. If I try this right now, Ivy tries to templatize src/a/one.py, which fails. Is there a way to tell it to copy some files below src rather than templatizing them (e.g., based on file extension)? Or should I put them under res?

    opened by gvwilson 8
  • Q: how to generate a/index.html ?

    Q: how to generate a/index.html ?

    I have:

    .
    `-- src
        |-- a
        |   `-- index.html
        |-- b
        |   `-- index.html
        `-- index.html
    

    I would like to produce:

    .
    `-- out
        |-- a
        |   `-- index.html
        |-- b
        |   `-- index.html
        `-- index.html
    

    so that /a/ and /b/ will be valid URLs. Right now, Ivy wants to generate:

    .
    `-- src
        |-- a.html
        |-- b.html
        `-- index.html
    

    Is there a way to force the desired behavior (so that old URLs won't break)?

    opened by gvwilson 7
  • Preventing actions for specific commands

    Preventing actions for specific commands

    I have a event handler registered for ivy.events.Event.EXIT that copies figure files from src/*/whatever to docs/*/whatever. I want it to run for ivy build and ivy watch, but not for ivy clear. What's the right way to ensure this?

    opened by gvwilson 6
  • Generating an index

    Generating an index

    I've added another extension to https://github.com/gvwilson/theme to generate an index, but I believe my approach has broken caching.

    1. The i shortcode in lib/mccole/extensions/index.py translates index entries into links, and as a side effect, records all index keys and the files they appear in. So far, so good.
    2. I want to define another shortcode to generate a list of all index entries for inclusion in an appendix. However, if the appendix page is not the last one to be generated, not all of the index entries will have been collectedl, and the index will be incomplete.
    3. I therefore use an "exit" event handler to to read the generated HTML back in and insert the generated index.

    This approach is ugly; it also seems to confuse the file cache. Is there a better approach?

    opened by gvwilson 6
  • Q: include files in themes?

    Q: include files in themes?

    Is there a way to put include files in themes, e.g., lib/whatever/inc? I have several snippets that are shared between templates, and including them in the template directory rather that in the root inc directory seems more portable. thx - Greg

    opened by gvwilson 5
  • Automenu extension sometimes adds extra '.html'

    Automenu extension sometimes adds extra '.html'

    As you can see from this debug output: https://gistcdn.rawgit.org/a-vrma/1c656d7ec6cd451a1259938d8ed170f1/e16ba97f1769a5ba150a83a65a70ab4a6e3047ad/index.html

    zzz.html.html is the url but the actual file on disk is called zzz.html

    opened by averms 3
  • Failed to change fonts

    Failed to change fonts

    I am trying to add Chinese fonts in graphite theme. I have downloaded necessary fonts in fonts\ folder and add it to fonts.css. After that, I tried to change graphite.css file's 57th line (maybe different in your device), from font-family: 'Crimson Text', Georgia, serif; to font-family: 'LXGW WenKai', sans-serif, but it didn't work after build and serve.

    opened by Adam-Teng 2
  • feat: use ivy.py instead of config.py for configuration

    feat: use ivy.py instead of config.py for configuration

    The root directory of my project is littered with configuration files; requiring the Ivy configuration file to be called config.py doesn't make its purpose obvious. One option would be to call it ivy.py; another would be to load the .ivy file as a Python source file; a third (my preferred option) would be to allow Ivy to read settings from an [ivy] section of setup.cfg.

    I started working on that, then realized the order of operations makes it complicated: command-line args are parsed after the config file is loaded, so ivy --config filename becomes "load default config, parse arguments based on that information, then load a new configuration". (The same thing makes it difficult to implement a "change directory before executing" flag similar to make's -C flag.) Is this a change you'd be open to?

    opened by gvwilson 2
  • feat: using enumeration for event hooks instead of strings

    feat: using enumeration for event hooks instead of strings

    Newcomers to the project may find it hard to figure out the processing cycle because there's no central listing of possible event hooks. This PR addresses that:

    1. Add an Event enum to ivy/events.py listing known event hooks.
    2. Add an EVENT_NAMES dict to support string-to-enum translations for backward compatibility.
    3. Register all internal events using enum elements.
    4. Alter all internal event registrations and firings to use enums.

    If this PR is useful, I'd be happy to add similar enumerations elsewhere, and to try to add documentation on the enum classes to try to explain the purpose/lifecycle of each element.

    This PR also adds a .gitignore file to ignore build artifacts.

    opened by gvwilson 2
  • best way to package a theme?

    best way to package a theme?

    What is the preferred way to package a theme that includes templates and resources as well as extensions?

    1. Create a zip file that people can download from GitHub and unzip in the root directory of their project?
    2. Create a Python package that has Ivy as a dependency and its own init command to install bundled resources?
    3. Something else?
    opened by gvwilson 2
A Python Static Website Generator

Version 0.8.9 Overview Hyde starter kit by merlinrebrovic is a really nice way to get started with hyde. Hyde layout for bootstrap by auzigog is also

Hyde - Static Website Generator 1.6k Jan 1, 2023
a static website generator to make beautiful customizable pictures galleries that tell a story

Prosopopee Prosopopee. Static site generator for your story. Make beautiful customizable pictures galleries that tell a story using a static website g

Bram 259 Dec 19, 2022
Simple, lightweight, and magic-free static site/blog generator for Python coders

makesite.py Take full control of your static website/blog generation by writing your own simple, lightweight, and magic-free static site generator in

Sunaina Pai 1.7k Jan 1, 2023
Static site generator that supports Markdown and reST syntax. Powered by Python.

Pelican Pelican is a static site generator, written in Python. Write content in reStructuredText or Markdown using your editor of choice Includes a si

Pelican dev team 11.3k Jan 4, 2023
A simple static site generator with deployment to S3/Cloudfront.

Stasis A simple static site generator with deployment to S3/Cloudfront. Features Stasis is a static website generator written in Python, using Pandoc

Scott Czepiel 56 Sep 29, 2022
dirmaker is a simple, opinionated static site generator for quickly publishing directory websites.

dirmaker is a simple, opinionated static site generator for publishing directory websites (eg: Indic.page, env.wiki It takes entries from a YAML file and generates a categorised, paginated directory website.

Kailash Nadh 40 Nov 20, 2022
Static site generator for designers. Uses Python and Django templates.

News Cactus 3 is out! We're happy to announce Cactus 3. It brings a set of great new features like asset fingerprinting, an asset pipeline, pretty url

null 3.4k Jan 1, 2023
AutoLoader is a plugin for Pelican, a static site generator written in Python.

AutoLoader AutoLoader is a plugin for Pelican, a static site generator written in Python. AutoLoader is designed to autoload the other Pelican plugins

null 2 Nov 7, 2022
Kaktos is a python static site generator

Python static site generator κάκτος Kaktos is a python static site generator. The idea is create a simple static site generator for people that don't

Paulo Coutinho 4 Sep 21, 2022
barely is a lightweight, but highly extensible static site generator written in pure python.

barely is a lightweight, but highly extensible static site generator. Explore the docs » Quickstart · See available Plugins · Report Bug · Request Fea

null 40 Dec 1, 2022
A python-based static site generator for setting up a CV/Resume site

ezcv A python-based static site generator for setting up a CV/Resume site Table of Contents What does ezcv do? Features & Roadmap Why should I use ezc

Kieran Wood 5 Oct 25, 2022
A declarative website generator designed for high-quality websites, with a focus on easy maintenance and localization.

Grow Grow is a declarative tool for rapidly building, launching, and maintaining high-quality static HTML. Easy installation Jinja template engine Con

Grow 385 Dec 3, 2022
The lektor static file content management system

Lektor Lektor is a static website generator. It builds out an entire project from static files into many individual HTML pages and has a built-in admi

Lektor CMS 3.6k Dec 29, 2022
Makes dynamic linked shit "static". Amazing

static.py What does it do? You give it a dynamically linked binary and it will make a directory that has all the dependencies (recursively). It also f

Stephen Tong 24 Dec 16, 2022
Simple Static Site Inductor Made in Python

sssimp ?? Simple Static Site Inductor Made in Python How to use Create a folder called input, inside create a folder called content and an empty file

Tina 11 Oct 9, 2022
Hobby Project. A Python Library to create and generate static web pages using just python.

PyWeb ??️ ?? Current Release: 0.1 A Hobby Project ?? PyWeb is a small Library to generate customized static web pages using python. Aimed for new deve

Abhinav Sinha 2 Nov 18, 2021
Wordle-solver - A tool that helps people who struggle with vocabulary to enjoy the famous game of WORDLE

Wordle-Solver Wordle-Solver helps people who struggle with vocabulary to enjoy t

Jason Chao 104 Dec 31, 2022
This is a simple website crawler which asks for a website link from the user to crawl and find specific data from the given website address.

This is a simple website crawler which asks for a website link from the user to crawl and find specific data from the given website address.

Faisal Ahmed 1 Jan 10, 2022
A static website and blog generator

Nikola, a Static Site and Blog Generator In goes content, out comes a website, ready to deploy. Why Static Websites? Static websites are safer, use fe

Nikola, a static site generator 2.4k Jan 5, 2023
A Python Static Website Generator

Version 0.8.9 Overview Hyde starter kit by merlinrebrovic is a really nice way to get started with hyde. Hyde layout for bootstrap by auzigog is also

Hyde - Static Website Generator 1.6k Jan 1, 2023