Ivy
Ivy is a static website generator built in Python. It's small, elegant, and simple to use.
Ivy is a static website generator built in Python. It's small, elegant, and simple to use.
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:
lib/mccole/extensions/tables.py
). If there's a way to do this, I'd be very happy to rewrite the extension.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.
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
?
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)?
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?
I've added another extension to https://github.com/gvwilson/theme to generate an index, but I believe my approach has broken caching.
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."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?
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
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
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.
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?
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:
Event
enum to ivy/events.py
listing known event hooks.EVENT_NAMES
dict to support string-to-enum translations for backward compatibility.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.
What is the preferred way to package a theme that includes templates and resources as well as extensions?
init
command to install bundled resources?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
Prosopopee Prosopopee. Static site generator for your story. Make beautiful customizable pictures galleries that tell a story using a static website g
makesite.py Take full control of your static website/blog generation by writing your own simple, lightweight, and magic-free static site generator in
Pelican Pelican is a static site generator, written in Python. Write content in reStructuredText or Markdown using your editor of choice Includes a si
Stasis A simple static site generator with deployment to S3/Cloudfront. Features Stasis is a static website generator written in Python, using Pandoc
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.
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
AutoLoader AutoLoader is a plugin for Pelican, a static site generator written in Python. AutoLoader is designed to autoload the other Pelican plugins
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
barely is a lightweight, but highly extensible static site generator. Explore the docs » Quickstart · See available Plugins · Report Bug · Request Fea
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
Grow Grow is a declarative tool for rapidly building, launching, and maintaining high-quality static HTML. Easy installation Jinja template engine Con
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
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
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
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
Wordle-Solver Wordle-Solver helps people who struggle with vocabulary to enjoy t
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.
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
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