From 8ce67f2b9042046c8fb6173a8748dcb661801271 Mon Sep 17 00:00:00 2001 From: Darren Mulholland Date: Sat, 29 Apr 2023 01:57:43 +0100 Subject: [PATCH] Rename application to Ark --- {ivy => ark}/__init__.py | 16 +- {ivy => ark}/__main__.py | 16 +- {ivy => ark}/bundle/inc/menu.md | 0 {ivy => ark}/bundle/lib/debug/license.txt | 0 ark/bundle/lib/debug/readme.md | 6 + .../bundle/lib/debug/resources/debug.css | 0 .../bundle/lib/debug/resources/pygments.css | 0 .../bundle/lib/debug/templates/node.ibis | 0 {ivy => ark}/bundle/lib/graphite/license.txt | 0 {ivy => ark}/bundle/lib/graphite/readme.md | 4 +- .../lib/graphite/resources/assets/fonts.css | 0 .../assets/fonts/CrimsonText-Bold.ttf | Bin .../assets/fonts/CrimsonText-Bold.woff2 | Bin .../assets/fonts/CrimsonText-BoldItalic.ttf | Bin .../assets/fonts/CrimsonText-BoldItalic.woff2 | Bin .../assets/fonts/CrimsonText-Italic.ttf | Bin .../assets/fonts/CrimsonText-Italic.woff2 | Bin .../assets/fonts/CrimsonText-Regular.ttf | Bin .../assets/fonts/CrimsonText-Regular.woff2 | Bin .../assets/fonts/CrimsonText-SemiBold.ttf | Bin .../assets/fonts/CrimsonText-SemiBold.woff2 | Bin .../fonts/CrimsonText-SemiBoldItalic.ttf | Bin .../fonts/CrimsonText-SemiBoldItalic.woff2 | Bin .../graphite/resources/assets/fonts/OFL.txt | 0 .../graphite/resources/assets/graphite.css | 0 .../graphite/resources/assets/pygments.css | 0 .../bundle/lib/graphite/templates/node.ibis | 0 {ivy => ark}/bundle/site.py | 2 +- {ivy => ark}/bundle/src/about.md | 0 {ivy => ark}/bundle/src/index.stx | 0 {ivy => ark}/bundle/src/parent.md | 0 {ivy => ark}/bundle/src/parent/child-one.md | 0 {ivy => ark}/bundle/src/parent/child-two.md | 0 {ivy => ark}/cli/__init__.py | 16 +- {ivy => ark}/cli/add.py | 2 +- {ivy => ark}/cli/build.py | 4 +- {ivy => ark}/cli/clear.py | 2 +- {ivy => ark}/cli/deploy.py | 2 +- {ivy => ark}/cli/init.py | 6 +- {ivy => ark}/cli/open.py | 12 +- {ivy => ark}/cli/serve.py | 2 +- {ivy => ark}/cli/tree.py | 6 +- {ivy => ark}/cli/watch.py | 8 +- {ivy => ark}/events.py | 2 +- {ivy => ark}/extensions.py | 6 +- .../extensions/ark_automenu.py | 6 +- .../ivy_ibis.py => ark/extensions/ark_ibis.py | 12 +- .../extensions/ark_jinja.py | 14 +- .../extensions/ark_markdown.py | 10 +- .../extensions/ark_shortcodes.py | 10 +- ark/extensions/ark_syntext.py | 15 ++ .../ivy_yaml.py => ark/extensions/ark_yaml.py | 8 +- {ivy => ark}/filters.py | 2 +- {ivy => ark}/hashes.py | 6 +- {ivy => ark}/nodes.py | 2 +- {ivy => ark}/renderers.py | 2 +- {ivy => ark}/site.py | 22 +-- {ivy => ark}/templates.py | 4 +- {ivy => ark}/utils.py | 0 demo/config.py | 4 +- demo/out/assets/graphite.css | 38 +++- demo/out/code.html | 18 +- demo/out/images.html | 4 +- demo/out/index.html | 16 +- demo/out/parent.html | 4 +- demo/out/parent/child-one.html | 4 +- demo/out/parent/child-two.html | 4 +- demo/out/short.html | 4 +- demo/src/index.stx | 2 +- docs/config.py | 6 +- docs/inc/menu.stx | 2 +- docs/out/assets/graphite.css | 17 +- docs/out/changelog.html | 18 +- docs/out/configuration.html | 181 ------------------ docs/out/extensions.html | 58 +++--- docs/out/faq.html | 80 ++++---- docs/out/index.html | 36 ++-- docs/out/license.html | 14 +- docs/out/options.html | 36 ++-- docs/out/quickstart.html | 36 ++-- docs/out/resources.html | 18 +- docs/out/shortcodes.html | 28 +-- docs/out/sites.html | 34 ++-- docs/out/themes.html | 34 ++-- docs/src/changelog.stx | 8 +- docs/src/extensions.stx | 54 +++--- docs/src/faq.stx | 44 ++--- docs/src/index.stx | 30 +-- docs/src/license.stx | 6 +- docs/src/options.stx | 30 +-- docs/src/quickstart.stx | 30 +-- docs/src/resources.stx | 12 +- docs/src/shortcodes.stx | 22 +-- docs/src/sites.stx | 28 +-- docs/src/themes.stx | 28 +-- ivy/bundle/lib/debug/readme.md | 6 - ivy/extensions/ivy_syntext.py | 17 -- readme.md | 8 +- setup.py | 18 +- 99 files changed, 551 insertions(+), 711 deletions(-) rename {ivy => ark}/__init__.py (80%) rename {ivy => ark}/__main__.py (61%) rename {ivy => ark}/bundle/inc/menu.md (100%) rename {ivy => ark}/bundle/lib/debug/license.txt (100%) create mode 100644 ark/bundle/lib/debug/readme.md rename {ivy => ark}/bundle/lib/debug/resources/debug.css (100%) rename {ivy => ark}/bundle/lib/debug/resources/pygments.css (100%) rename {ivy => ark}/bundle/lib/debug/templates/node.ibis (100%) rename {ivy => ark}/bundle/lib/graphite/license.txt (100%) rename {ivy => ark}/bundle/lib/graphite/readme.md (91%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts.css (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.ttf (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.woff2 (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.ttf (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.woff2 (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.ttf (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.woff2 (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.ttf (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.woff2 (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.ttf (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.woff2 (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.ttf (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.woff2 (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/fonts/OFL.txt (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/graphite.css (100%) rename {ivy => ark}/bundle/lib/graphite/resources/assets/pygments.css (100%) rename {ivy => ark}/bundle/lib/graphite/templates/node.ibis (100%) rename {ivy => ark}/bundle/site.py (92%) rename {ivy => ark}/bundle/src/about.md (100%) rename {ivy => ark}/bundle/src/index.stx (100%) rename {ivy => ark}/bundle/src/parent.md (100%) rename {ivy => ark}/bundle/src/parent/child-one.md (100%) rename {ivy => ark}/bundle/src/parent/child-two.md (100%) rename {ivy => ark}/cli/__init__.py (85%) rename {ivy => ark}/cli/add.py (99%) rename {ivy => ark}/cli/build.py (97%) rename {ivy => ark}/cli/clear.py (98%) rename {ivy => ark}/cli/deploy.py (98%) rename {ivy => ark}/cli/init.py (89%) rename {ivy => ark}/cli/open.py (86%) rename {ivy => ark}/cli/serve.py (99%) rename {ivy => ark}/cli/tree.py (95%) rename {ivy => ark}/cli/watch.py (96%) rename {ivy => ark}/events.py (97%) rename {ivy => ark}/extensions.py (93%) rename ivy/extensions/ivy_automenu.py => ark/extensions/ark_automenu.py (97%) rename ivy/extensions/ivy_ibis.py => ark/extensions/ark_ibis.py (53%) rename ivy/extensions/ivy_jinja.py => ark/extensions/ark_jinja.py (59%) rename ivy/extensions/ivy_markdown.py => ark/extensions/ark_markdown.py (54%) rename ivy/extensions/ivy_shortcodes.py => ark/extensions/ark_shortcodes.py (82%) create mode 100644 ark/extensions/ark_syntext.py rename ivy/extensions/ivy_yaml.py => ark/extensions/ark_yaml.py (79%) rename {ivy => ark}/filters.py (98%) rename {ivy => ark}/hashes.py (94%) rename {ivy => ark}/nodes.py (99%) rename {ivy => ark}/renderers.py (97%) rename {ivy => ark}/site.py (91%) rename {ivy => ark}/templates.py (94%) rename {ivy => ark}/utils.py (100%) delete mode 100644 docs/out/configuration.html delete mode 100644 ivy/bundle/lib/debug/readme.md delete mode 100644 ivy/extensions/ivy_syntext.py diff --git a/ivy/__init__.py b/ark/__init__.py similarity index 80% rename from ivy/__init__.py rename to ark/__init__.py index 4e80a57..9f9aff7 100644 --- a/ivy/__init__.py +++ b/ark/__init__.py @@ -1,12 +1,12 @@ # ------------------------------------------------------------------------------ -# Ivy: a static website generator. +# Ark: a static website generator. # ------------------------------------------------------------------------------ -__version__ = '6.5.1' +__version__ = '7.0.0' import sys if sys.version_info < (3, 10): - sys.exit('Error: Ivy requires Python 3.10 or later.') + sys.exit('Error: Ark requires Python 3.10 or later.') # On Windows, use the 'colorama' package if it's available to support ANSI @@ -20,9 +20,9 @@ colorama.init() -# We import the package's modules so users can access 'ivy.foo' via a simple -# 'import ivy' statement. Otherwise the user would have to import each module -# individually as 'import ivy.foo'. +# We import the package's modules so users can access 'ark.foo' via a simple +# 'import ark' statement. Otherwise the user would have to import each module +# individually as 'import ark.foo'. from . import cli from . import extensions from . import hashes @@ -35,14 +35,14 @@ # Application entry point. Calling main() initializes the site model, loads -# the site's plugins, then fires a sequence of event hooks. All of Ivy's +# the site's plugins, then fires a sequence of event hooks. All of Ark's # functionality is handled by callbacks registered on these hooks. def main(): # Initialize the site model. site.init() - # Load plugins bundled with Ivy itself, then any plugins listed in the + # Load plugins bundled with Ark itself, then any plugins listed in the # site's config.py file, then any plugins in the site's 'ext' directory. extensions.load_bundled_extensions() extensions.load_installed_extensions() diff --git a/ivy/__main__.py b/ark/__main__.py similarity index 61% rename from ivy/__main__.py rename to ark/__main__.py index 3fd2284..94013f5 100644 --- a/ivy/__main__.py +++ b/ark/__main__.py @@ -1,21 +1,21 @@ # ------------------------------------------------------------------------------ -# This module makes the `ivy` package directly executable. To run an `ivy` +# This module makes the `ark` package directly executable. To run an `ark` # package located on Python's import search path use: # -# $ python -m ivy +# $ python -m ark # -# To run an arbitrary `ivy` package use: +# To run an arbitrary `ark` package use: # -# $ python /path/to/ivy/package +# $ python /path/to/ark/package # ------------------------------------------------------------------------------ import os import sys -# We need to manually add the package's parent directory to the module search -# path before we can `import ivy`. +# We need to manually add the package's parent directory to the module search +# path before we can `import ark`. sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) -import ivy +import ark sys.path.pop(0) -ivy.main() +ark.main() diff --git a/ivy/bundle/inc/menu.md b/ark/bundle/inc/menu.md similarity index 100% rename from ivy/bundle/inc/menu.md rename to ark/bundle/inc/menu.md diff --git a/ivy/bundle/lib/debug/license.txt b/ark/bundle/lib/debug/license.txt similarity index 100% rename from ivy/bundle/lib/debug/license.txt rename to ark/bundle/lib/debug/license.txt diff --git a/ark/bundle/lib/debug/readme.md b/ark/bundle/lib/debug/readme.md new file mode 100644 index 0000000..b166dce --- /dev/null +++ b/ark/bundle/lib/debug/readme.md @@ -0,0 +1,6 @@ +# Ark Debug Theme + +[1]: https://github.com/dmulholl/ark + +This [Ark][1] theme is designed as a debugging tool, useful when building themes or plugins. +It displays all the page data available for use in template files. diff --git a/ivy/bundle/lib/debug/resources/debug.css b/ark/bundle/lib/debug/resources/debug.css similarity index 100% rename from ivy/bundle/lib/debug/resources/debug.css rename to ark/bundle/lib/debug/resources/debug.css diff --git a/ivy/bundle/lib/debug/resources/pygments.css b/ark/bundle/lib/debug/resources/pygments.css similarity index 100% rename from ivy/bundle/lib/debug/resources/pygments.css rename to ark/bundle/lib/debug/resources/pygments.css diff --git a/ivy/bundle/lib/debug/templates/node.ibis b/ark/bundle/lib/debug/templates/node.ibis similarity index 100% rename from ivy/bundle/lib/debug/templates/node.ibis rename to ark/bundle/lib/debug/templates/node.ibis diff --git a/ivy/bundle/lib/graphite/license.txt b/ark/bundle/lib/graphite/license.txt similarity index 100% rename from ivy/bundle/lib/graphite/license.txt rename to ark/bundle/lib/graphite/license.txt diff --git a/ivy/bundle/lib/graphite/readme.md b/ark/bundle/lib/graphite/readme.md similarity index 91% rename from ivy/bundle/lib/graphite/readme.md rename to ark/bundle/lib/graphite/readme.md index 207f817..d2a1ce9 100644 --- a/ivy/bundle/lib/graphite/readme.md +++ b/ark/bundle/lib/graphite/readme.md @@ -1,9 +1,9 @@ # Graphite -[1]: https://github.com/dmulholl/ivy +[1]: https://github.com/dmulholl/ark [2]: https://fonts.google.com/specimen/Crimson+Text -A simple [Ivy][1] theme designed for generating project documentation. +A simple [Ark][1] theme designed for generating project documentation. This theme will display the following attributes from the site's configuration file in the site header: diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts.css b/ark/bundle/lib/graphite/resources/assets/fonts.css similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts.css rename to ark/bundle/lib/graphite/resources/assets/fonts.css diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.ttf b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.ttf similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.ttf rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.ttf diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.woff2 b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.woff2 similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.woff2 rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Bold.woff2 diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.ttf b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.ttf similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.ttf rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.ttf diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.woff2 b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.woff2 similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.woff2 rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-BoldItalic.woff2 diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.ttf b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.ttf similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.ttf rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.ttf diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.woff2 b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.woff2 similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.woff2 rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Italic.woff2 diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.ttf b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.ttf similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.ttf rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.ttf diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.woff2 b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.woff2 similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.woff2 rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-Regular.woff2 diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.ttf b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.ttf similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.ttf rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.ttf diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.woff2 b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.woff2 similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.woff2 rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBold.woff2 diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.ttf b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.ttf similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.ttf rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.ttf diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.woff2 b/ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.woff2 similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.woff2 rename to ark/bundle/lib/graphite/resources/assets/fonts/CrimsonText-SemiBoldItalic.woff2 diff --git a/ivy/bundle/lib/graphite/resources/assets/fonts/OFL.txt b/ark/bundle/lib/graphite/resources/assets/fonts/OFL.txt similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/fonts/OFL.txt rename to ark/bundle/lib/graphite/resources/assets/fonts/OFL.txt diff --git a/ivy/bundle/lib/graphite/resources/assets/graphite.css b/ark/bundle/lib/graphite/resources/assets/graphite.css similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/graphite.css rename to ark/bundle/lib/graphite/resources/assets/graphite.css diff --git a/ivy/bundle/lib/graphite/resources/assets/pygments.css b/ark/bundle/lib/graphite/resources/assets/pygments.css similarity index 100% rename from ivy/bundle/lib/graphite/resources/assets/pygments.css rename to ark/bundle/lib/graphite/resources/assets/pygments.css diff --git a/ivy/bundle/lib/graphite/templates/node.ibis b/ark/bundle/lib/graphite/templates/node.ibis similarity index 100% rename from ivy/bundle/lib/graphite/templates/node.ibis rename to ark/bundle/lib/graphite/templates/node.ibis diff --git a/ivy/bundle/site.py b/ark/bundle/site.py similarity index 92% rename from ivy/bundle/site.py rename to ark/bundle/site.py index 170bca9..10b23b5 100644 --- a/ivy/bundle/site.py +++ b/ark/bundle/site.py @@ -13,4 +13,4 @@ title = "Site Title" # Site tagline. -tagline = "Just another Ivy site." +tagline = "Just another Ark site." diff --git a/ivy/bundle/src/about.md b/ark/bundle/src/about.md similarity index 100% rename from ivy/bundle/src/about.md rename to ark/bundle/src/about.md diff --git a/ivy/bundle/src/index.stx b/ark/bundle/src/index.stx similarity index 100% rename from ivy/bundle/src/index.stx rename to ark/bundle/src/index.stx diff --git a/ivy/bundle/src/parent.md b/ark/bundle/src/parent.md similarity index 100% rename from ivy/bundle/src/parent.md rename to ark/bundle/src/parent.md diff --git a/ivy/bundle/src/parent/child-one.md b/ark/bundle/src/parent/child-one.md similarity index 100% rename from ivy/bundle/src/parent/child-one.md rename to ark/bundle/src/parent/child-one.md diff --git a/ivy/bundle/src/parent/child-two.md b/ark/bundle/src/parent/child-two.md similarity index 100% rename from ivy/bundle/src/parent/child-two.md rename to ark/bundle/src/parent/child-two.md diff --git a/ivy/cli/__init__.py b/ark/cli/__init__.py similarity index 85% rename from ivy/cli/__init__.py rename to ark/cli/__init__.py index 002390c..d2f8397 100644 --- a/ivy/cli/__init__.py +++ b/ark/cli/__init__.py @@ -2,7 +2,7 @@ # This package processes the application's command-line arguments. # ------------------------------------------------------------------------------ -import ivy +import ark import sys import argslib @@ -18,15 +18,15 @@ helptext = f""" -Ivy v{ivy.__version__} +Ark v{ark.__version__} - Ivy is a static website generator. It transforms a directory of text files + Ark is a static website generator. It transforms a directory of text files into a self-contained website. Usage: - ivy - ivy - ivy help + ark + ark + ark help Flags: -h, --help Print the application's help text and exit. @@ -49,13 +49,13 @@ # We store the root ArgParser instance globally so it's available to plugins. -argparser = argslib.ArgParser(helptext, ivy.__version__) +argparser = argslib.ArgParser(helptext, ark.__version__) # Parse the application's command-line arguments. Plugins can use the `CLI` # event to register their own custom commands. def parse_args(): - ivy.events.fire(ivy.events.Event.CLI, argparser) + ark.events.fire(ark.events.Event.CLI, argparser) argparser.parse() if argparser.command_name is None: diff --git a/ivy/cli/add.py b/ark/cli/add.py similarity index 99% rename from ivy/cli/add.py rename to ark/cli/add.py index 092f46f..1d50c83 100644 --- a/ivy/cli/add.py +++ b/ark/cli/add.py @@ -12,7 +12,7 @@ helptext = """ -Usage: ivy add +Usage: ark add This convenience command creates a new node file in the 'src' directory. The filename should be specified relative to the 'src' directory. diff --git a/ivy/cli/build.py b/ark/cli/build.py similarity index 97% rename from ivy/cli/build.py rename to ark/cli/build.py index 95bab1e..32b2409 100644 --- a/ivy/cli/build.py +++ b/ark/cli/build.py @@ -15,7 +15,7 @@ helptext = """ -Usage: ivy build +Usage: ark build Build the current site. This command can be run from the site directory or any of its subdirectories. @@ -75,7 +75,7 @@ def build_site(): # Callback to handle individual nodes. The `build_node` filter can be used # as a switch to decide if a node should be written to disk. A `disable` - # flag in a node's metadata header will also prevent Ivy from producing an + # flag in a node's metadata header will also prevent Ark from producing an # output HTML page for a node. def build_node(node): if filters.apply('build_node', True, node) and not node.get('disable'): diff --git a/ivy/cli/clear.py b/ark/cli/clear.py similarity index 98% rename from ivy/cli/clear.py rename to ark/cli/clear.py index c3b3e07..7b80f7b 100644 --- a/ivy/cli/clear.py +++ b/ark/cli/clear.py @@ -12,7 +12,7 @@ helptext = """ -Usage: ivy clear +Usage: ark clear Clear the output directory. diff --git a/ivy/cli/deploy.py b/ark/cli/deploy.py similarity index 98% rename from ivy/cli/deploy.py rename to ark/cli/deploy.py index 1214f93..bc38459 100644 --- a/ivy/cli/deploy.py +++ b/ark/cli/deploy.py @@ -10,7 +10,7 @@ helptext = """ -Usage: ivy deploy +Usage: ark deploy This command fires an 'Event.DEPLOY' event hook which plugins can use to run site deployment scripts. diff --git a/ivy/cli/init.py b/ark/cli/init.py similarity index 89% rename from ivy/cli/init.py rename to ark/cli/init.py index 3747346..391d496 100644 --- a/ivy/cli/init.py +++ b/ark/cli/init.py @@ -10,7 +10,7 @@ helptext = """ -Usage: ivy init [directory] +Usage: ark init [directory] Initialize a new site directory. If a directory path is specified, that directory will be created and initialized. Otherwise, the current directory @@ -30,8 +30,8 @@ def register_command(argparser): def cmd_callback(cmd_name, cmd_parser): - ivy_dir = os.path.dirname(os.path.dirname(__file__)) - src_dir = os.path.join(ivy_dir, 'bundle') + pkg_dir = os.path.dirname(os.path.dirname(__file__)) + src_dir = os.path.join(pkg_dir, 'bundle') dst_dir = cmd_parser.args[0] if cmd_parser.args else '.' os.makedirs(dst_dir, exist_ok=True) diff --git a/ivy/cli/open.py b/ark/cli/open.py similarity index 86% rename from ivy/cli/open.py rename to ark/cli/open.py index 87aafdd..e7a2249 100644 --- a/ivy/cli/open.py +++ b/ark/cli/open.py @@ -2,7 +2,7 @@ # This module contains the logic for the 'open' command. # ------------------------------------------------------------------------------ -import ivy +import ark import sys import webbrowser import os @@ -10,7 +10,7 @@ from .. import events helptext = """ -Usage: ivy open [url] +Usage: ark open [url] This command opens the output file corresponding to the specified @root/ url directly in the default web browser. If no url has been specified it defaults @@ -24,20 +24,20 @@ """ -@ivy.events.register(events.Event.CLI) +@ark.events.register(events.Event.CLI) def register_command(argparser): argparser.command("open", helptext, cmd_callback) def cmd_callback(cmd_name, cmd_parser): - if not ivy.site.home(): + if not ark.site.home(): sys.exit("Error: cannot locate the site's home directory.") - if not os.path.isdir(ivy.site.out()): + if not os.path.isdir(ark.site.out()): sys.exit("Error: cannot locate the site's output directory.") arg = cmd_parser.args[0] if cmd_parser.args else "@root/" - if (node := ivy.nodes.node(arg)): + if (node := ark.nodes.node(arg)): url = "file://" + node.get_output_filepath() webbrowser.open(url) else: diff --git a/ivy/cli/serve.py b/ark/cli/serve.py similarity index 99% rename from ivy/cli/serve.py rename to ark/cli/serve.py index 4994675..d22f057 100644 --- a/ivy/cli/serve.py +++ b/ark/cli/serve.py @@ -13,7 +13,7 @@ helptext = """ -Usage: ivy serve +Usage: ark serve Serve the site's output directory using Python's builtin web server. The default web browser is automatically launched to view the site. diff --git a/ivy/cli/tree.py b/ark/cli/tree.py similarity index 95% rename from ivy/cli/tree.py rename to ark/cli/tree.py index e961df6..41c847e 100644 --- a/ivy/cli/tree.py +++ b/ark/cli/tree.py @@ -12,18 +12,18 @@ helptext = """ -Usage: ivy tree +Usage: ark tree This command prints the site's node tree. The root node to use as the starting point can be specifed using the --root option: - $ ivy tree --root @root/foo/bar// + $ ark tree --root @root/foo/bar// The tree displays urls by default. Use the --slugs flag to print slugs instead. Use the --attr option to append the value of an arbitrary metadata attribute, e.g. - $ ivy tree --attr title --attr date + $ ark tree --attr title --attr date Options: -a, --attr Display the named metadata attribute. diff --git a/ivy/cli/watch.py b/ark/cli/watch.py similarity index 96% rename from ivy/cli/watch.py rename to ark/cli/watch.py index 4bcde90..9c05b88 100644 --- a/ivy/cli/watch.py +++ b/ark/cli/watch.py @@ -15,7 +15,7 @@ helptext = """ -Usage: ivy watch +Usage: ark watch Monitor the site directory and automatically rebuild the site when file changes are detected. @@ -47,10 +47,10 @@ def cmd_callback(cmd_name, cmd_parser): if not home: sys.exit("Error: cannot locate the site's home directory.") - # We want to reinvoke the currently active Ivy package when we call the + # We want to reinvoke the currently active Ark package when we call the # build command. This package may have been invoked in one of three ways: - # 1. Directly: `python /path/to/ivy/directory`. - # 2. As an installed package on the import path: `python -m ivy`. + # 1. Directly: `python /path/to/ark/directory`. + # 2. As an installed package on the import path: `python -m ark`. # 3. Via an entry script or Windows executable. if os.path.isdir(sys.argv[0]): base = ['python3', sys.argv[0]] diff --git a/ivy/events.py b/ark/events.py similarity index 97% rename from ivy/events.py rename to ark/events.py index 992649a..dcf27e5 100644 --- a/ivy/events.py +++ b/ark/events.py @@ -13,7 +13,7 @@ # compatibility. @unique class Event(Enum): - """All events that Ivy understands are listed here.""" + """All events are listed here.""" CLI = "cli" DEPLOY = "deploy" EXIT = "exit" diff --git a/ivy/extensions.py b/ark/extensions.py similarity index 93% rename from ivy/extensions.py rename to ark/extensions.py index efe42d8..024cea6 100644 --- a/ivy/extensions.py +++ b/ark/extensions.py @@ -1,6 +1,6 @@ # ------------------------------------------------------------------------------ -# This module loads extensions, i.e. Python modules and packages which use -# Ivy's plugin architecture to extend its functionality. +# This module loads extensions, i.e. Python modules and packages which use Ark's +# plugin architecture to extend its functionality. # ------------------------------------------------------------------------------ import os @@ -30,7 +30,7 @@ def load_directory(dirpath: str): load_module(dirpath, name) -# Load Ivy's default set of bundled extensions. +# Load the default set of bundled extensions. def load_bundled_extensions(): load_directory(os.path.join(os.path.dirname(__file__), 'extensions')) diff --git a/ivy/extensions/ivy_automenu.py b/ark/extensions/ark_automenu.py similarity index 97% rename from ivy/extensions/ivy_automenu.py rename to ark/extensions/ark_automenu.py index 095bae1..434642b 100644 --- a/ivy/extensions/ivy_automenu.py +++ b/ark/extensions/ark_automenu.py @@ -14,7 +14,7 @@ # set to 'draft' or 'private' it will be excluded from the menu. ## -import ivy +import ark # We generate the menu once and cache it for future use. @@ -22,7 +22,7 @@ # Register a callback to add an 'automenu' attribute to each page-data dictionary. -@ivy.events.register(ivy.events.Event.RENDER_PAGE) +@ark.events.register(ark.events.Event.RENDER_PAGE) def add_automenu(page_data): global cached_menu if cached_menu is None: @@ -37,7 +37,7 @@ def add_automenu(page_data): # This determines the ordering of nodes and subnodes in the memu. def make_menu(include_func=None, sort_func=None): menu = ['
    \n'] - root = ivy.nodes.root() + root = ark.nodes.root() title = root.get('menu_title') or root.get('title') or 'Home' menu.append(f'
  • {title}
  • \n') for node in sorted_children(root, include_func, sort_func): diff --git a/ivy/extensions/ivy_ibis.py b/ark/extensions/ark_ibis.py similarity index 53% rename from ivy/extensions/ivy_ibis.py rename to ark/extensions/ark_ibis.py index 6019964..6c212e0 100644 --- a/ivy/extensions/ivy_ibis.py +++ b/ark/extensions/ark_ibis.py @@ -1,8 +1,6 @@ -## -## Add support for Ibis template files with a `.ibis` extension. -## +# Add support for Ibis template files with a `.ibis` extension. -import ivy +import ark try: import ibis @@ -10,11 +8,11 @@ ibis = None if ibis: - @ivy.events.register(ivy.events.Event.INIT) + @ark.events.register(ark.events.Event.INIT) def initalize_template_loader(): - ibis.loader = ibis.loaders.FileLoader(ivy.site.theme('templates')) + ibis.loader = ibis.loaders.FileLoader(ark.site.theme('templates')) - @ivy.templates.register('ibis') + @ark.templates.register('ibis') def render_page(page_data, template_filename): template = ibis.loader(template_filename) return template.render(page_data) diff --git a/ivy/extensions/ivy_jinja.py b/ark/extensions/ark_jinja.py similarity index 59% rename from ivy/extensions/ivy_jinja.py rename to ark/extensions/ark_jinja.py index 2f8720e..e5fea02 100644 --- a/ivy/extensions/ivy_jinja.py +++ b/ark/extensions/ark_jinja.py @@ -1,8 +1,6 @@ -## -## Add support for Jinja template files with a `.jinja` extension. -## +# Add support for Jinja template files with a `.jinja` extension. -import ivy +import ark try: import jinja2 @@ -12,16 +10,16 @@ jinja_environment = None if jinja2: - @ivy.events.register(ivy.events.Event.INIT) + @ark.events.register(ark.events.Event.INIT) def initialize_jinja_environment(): settings = { - 'loader': jinja2.FileSystemLoader(ivy.site.theme('templates')) + 'loader': jinja2.FileSystemLoader(ark.site.theme('templates')) } - settings.update(ivy.site.config.get('jinja_settings', {})) + settings.update(ark.site.config.get('jinja_settings', {})) global jinja_environment jinja_environment = jinja2.Environment(**settings) - @ivy.templates.register('jinja') + @ark.templates.register('jinja') def render_page(page_data, template_filename): template = jinja_environment.get_template(template_filename) return template.render(page_data) diff --git a/ivy/extensions/ivy_markdown.py b/ark/extensions/ark_markdown.py similarity index 54% rename from ivy/extensions/ivy_markdown.py rename to ark/extensions/ark_markdown.py index b53475c..198e8a7 100644 --- a/ivy/extensions/ivy_markdown.py +++ b/ark/extensions/ark_markdown.py @@ -1,8 +1,6 @@ -## -## Add support for Markdown files with a `.md` extension. -## +# Add support for Markdown files with a `.md` extension. -import ivy +import ark try: import markdown @@ -10,9 +8,9 @@ markdown = None if markdown: - settings = ivy.site.config.get('markdown_settings') or {} + settings = ark.site.config.get('markdown_settings') or {} renderer = markdown.Markdown(**settings) - @ivy.renderers.register('md') + @ark.renderers.register('md') def render_markdown(text): return renderer.reset().convert(text) diff --git a/ivy/extensions/ivy_shortcodes.py b/ark/extensions/ark_shortcodes.py similarity index 82% rename from ivy/extensions/ivy_shortcodes.py rename to ark/extensions/ark_shortcodes.py index 0393153..6f6ea31 100644 --- a/ivy/extensions/ivy_shortcodes.py +++ b/ark/extensions/ark_shortcodes.py @@ -1,8 +1,6 @@ -## -## Add support for shortcodes in node content. -## +# Add support for shortcodes in node content. -import ivy +import ark import sys try: @@ -20,11 +18,11 @@ # We process and replace shortcodes in the node's text content just before # that text is rendered into HTML. - @ivy.filters.register(ivy.filters.Filter.NODE_TEXT) + @ark.filters.register(ark.filters.Filter.NODE_TEXT) def render_shortcodes(text, node): global parser if parser is None: - settings = ivy.site.config.get('shortcode_settings') or {} + settings = ark.site.config.get('shortcode_settings') or {} parser = shortcodes.Parser(**settings) try: diff --git a/ark/extensions/ark_syntext.py b/ark/extensions/ark_syntext.py new file mode 100644 index 0000000..8279bf4 --- /dev/null +++ b/ark/extensions/ark_syntext.py @@ -0,0 +1,15 @@ +# Add support for Syntext files with a `.stx` extension. + +import ark + +try: + import syntext +except ImportError: + syntext = None + +settings = ark.site.config.get('syntext_settings') or {'pygmentize': True} + +if syntext: + @ark.renderers.register('stx') + def render_syntext(text): + return syntext.render(text, **settings) diff --git a/ivy/extensions/ivy_yaml.py b/ark/extensions/ark_yaml.py similarity index 79% rename from ivy/extensions/ivy_yaml.py rename to ark/extensions/ark_yaml.py index f676a02..f07115d 100644 --- a/ivy/extensions/ivy_yaml.py +++ b/ark/extensions/ark_yaml.py @@ -1,8 +1,6 @@ -## -## Add support for YAML file headers. -## +# Add support for YAML file headers. -import ivy +import ark import re try: @@ -11,7 +9,7 @@ yaml = None if yaml: - @ivy.filters.register(ivy.filters.Filter.FILE_TEXT) + @ark.filters.register(ark.filters.Filter.FILE_TEXT) def parse_yaml_header(text, meta_dict): if text.startswith("---\n"): if match := re.match(r"^---\n(.*?\n)---\n", text, re.DOTALL): diff --git a/ivy/filters.py b/ark/filters.py similarity index 98% rename from ivy/filters.py rename to ark/filters.py index 7b4276c..0c49f1b 100644 --- a/ivy/filters.py +++ b/ark/filters.py @@ -13,7 +13,7 @@ # compatibility. @unique class Filter(Enum): - """All filters that Ivy understands are listed here.""" + """All filters are listed here.""" BUILD_NODE = "build_node" CLASS_LIST = "class_list" FILE_TEXT = "file_text" diff --git a/ivy/hashes.py b/ark/hashes.py similarity index 94% rename from ivy/hashes.py rename to ark/hashes.py index 9cb23a8..b25e577 100644 --- a/ivy/hashes.py +++ b/ark/hashes.py @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# This module handles Ivy's file hashing mechanism. +# This module handles Ark's file hashing mechanism. # # Before writing a page file to disk we check if there is an existing file of # the same name left over from a previous build. If there is, we compare the @@ -61,9 +61,9 @@ def _cachefile() -> str: name = hashlib.sha1(site.home().encode()).hexdigest() + '.pickle' if os.name == 'nt': root = os.getenv('LOCALAPPDATA', os.path.expanduser('~')) - root = os.path.join(root, 'Ivy') + root = os.path.join(root, 'Ark') else: - root = os.path.expanduser('~/.cache/ivy') + root = os.path.expanduser('~/.cache/ark') _file = os.path.join(root, name) return _file diff --git a/ivy/nodes.py b/ark/nodes.py similarity index 99% rename from ivy/nodes.py rename to ark/nodes.py index e805e73..11eab88 100644 --- a/ivy/nodes.py +++ b/ark/nodes.py @@ -2,7 +2,7 @@ # This module is responsible for assembling and caching the parse tree of nodes. # Each node corresponds to a text file and/or directory in the site's `src` # directory. (A node file provides content and metadata for a node; a node -# directory stores child nodes.) Ivy parses the `src` directory into a tree of +# directory stores child nodes.) Ark parses the `src` directory into a tree of # nodes which it then renders into a website, generating a single HTML page in # the `out` directory for each node in the tree. # ------------------------------------------------------------------------------ diff --git a/ivy/renderers.py b/ark/renderers.py similarity index 97% rename from ivy/renderers.py rename to ark/renderers.py index 8231e13..269f6cf 100644 --- a/ivy/renderers.py +++ b/ark/renderers.py @@ -18,7 +18,7 @@ # Callbacks are registered per file extension. More than one file extension can # be specified, e.g. # -# @ivy.renderers.register('md', 'mdk') +# @ark.renderers.register('md', 'mdk') # def callback(text): # ... # return html diff --git a/ivy/site.py b/ark/site.py similarity index 91% rename from ivy/site.py rename to ark/site.py index c4629d2..c9fa2a4 100644 --- a/ivy/site.py +++ b/ark/site.py @@ -59,10 +59,10 @@ def init(): # Returns a list of valid names for the site configuration file. def _get_valid_config_file_names(): - if valid_names := os.environ.get("IVY_CONFIG_FILE"): + if valid_names := os.environ.get("ARK_CONFIG_FILE"): return valid_names.split(":") else: - return ("site.py", "config.py", ".ivy") + return ("site.py", "config.py") # Attempts to determine the path to the site's home directory and site @@ -99,7 +99,7 @@ def src(*append: str) -> str: if src_path := cache.get("src_dir"): return join(src_path, *append) else: - src_name = config.get("src_dir") or os.environ.get("IVY_SRC_DIR") or "src" + src_name = config.get("src_dir") or os.environ.get("ARK_SRC_DIR") or "src" src_path = cache.setdefault("src_dir", join(home(), src_name)) return join(src_path, *append) @@ -109,7 +109,7 @@ def out(*append: str) -> str: if out_path := cache.get("out_dir"): return join(out_path, *append) else: - out_name = config.get("out_dir") or os.environ.get("IVY_OUT_DIR") or "out" + out_name = config.get("out_dir") or os.environ.get("ARK_OUT_DIR") or "out" out_path = cache.setdefault("out_dir", join(home(), out_name)) return join(out_path, *append) @@ -119,7 +119,7 @@ def lib(*append: str) -> str: if lib_path := cache.get("lib_dir"): return join(lib_path, *append) else: - lib_name = config.get("lib_dir") or os.environ.get("IVY_LIB_DIR") or "lib" + lib_name = config.get("lib_dir") or os.environ.get("ARK_LIB_DIR") or "lib" lib_path = cache.setdefault("lib_dir", join(home(), lib_name)) return join(lib_path, *append) @@ -129,7 +129,7 @@ def ext(*append: str) -> str: if ext_path := cache.get("ext_dir"): return join(ext_path, *append) else: - ext_name = config.get("ext_dir") or os.environ.get("IVY_EXT_DIR") or "ext" + ext_name = config.get("ext_dir") or os.environ.get("ARK_EXT_DIR") or "ext" ext_path = cache.setdefault("ext_dir", join(home(), ext_name)) return join(ext_path, *append) @@ -139,7 +139,7 @@ def inc(*append: str) -> str: if inc_path := cache.get("inc_dir"): return join(inc_path, *append) else: - inc_name = config.get("inc_dir") or os.environ.get("IVY_INC_DIR") or "inc" + inc_name = config.get("inc_dir") or os.environ.get("ARK_INC_DIR") or "inc" inc_path = cache.setdefault("inc_dir", join(home(), inc_name)) return join(inc_path, *append) @@ -149,7 +149,7 @@ def res(*append: str) -> str: if res_path := cache.get("res_dir"): return join(res_path, *append) else: - res_name = config.get("res_dir") or os.environ.get("IVY_RES_DIR") or "res" + res_name = config.get("res_dir") or os.environ.get("ARK_RES_DIR") or "res" res_path = cache.setdefault("res_dir", join(home(), res_name)) return join(res_path, *append) @@ -170,9 +170,9 @@ def theme(*append: str) -> str: theme_path = cache.setdefault("theme_path", abspath(lib(theme_name))) return join(theme_path, *append) - if os.getenv("IVY_THEMES"): - if isdir(join(os.getenv("IVY_THEMES"), theme_name)): - theme_path = cache.setdefault("theme_path", abspath(join(os.getenv("IVY_THEMES", theme_name)))) + if os.getenv("ARK_THEMES"): + if isdir(join(os.getenv("ARK_THEMES"), theme_name)): + theme_path = cache.setdefault("theme_path", abspath(join(os.getenv("ARK_THEMES", theme_name)))) return join(theme_path, *append) bundled_theme = join(os.path.dirname(__file__), "bundle", "lib", theme_name) diff --git a/ivy/templates.py b/ark/templates.py similarity index 94% rename from ivy/templates.py rename to ark/templates.py index 54717e5..cc613b4 100644 --- a/ivy/templates.py +++ b/ark/templates.py @@ -24,7 +24,7 @@ # # Callbacks are registered per file extension, e.g. # -# @ivy.templates.register('ibis') +# @ark.templates.register('ibis') # def callback(page_data, template_filename): # ... # return html @@ -70,4 +70,4 @@ def render(page_data): msg = f"Error: The template file '{path.name}' has an unrecognised extension." sys.exit(msg) - sys.exit(f"Error: Ivy cannot locate a template file for the node: '{page_data['node'].url}'.") + sys.exit(f"Error: cannot locate a template file for the node: '{page_data['node'].url}'.") diff --git a/ivy/utils.py b/ark/utils.py similarity index 100% rename from ivy/utils.py rename to ark/utils.py diff --git a/demo/config.py b/demo/config.py index 0cbc88b..d568ec1 100644 --- a/demo/config.py +++ b/demo/config.py @@ -2,9 +2,9 @@ # Site Configuration File # # ------------------------- # -title = "Ivy Demo" +title = "Ark Demo" tagline = """ -Ivy is a static website generator built in Python. It transforms a directory of +Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website. """ diff --git a/demo/out/assets/graphite.css b/demo/out/assets/graphite.css index e1b5a8c..6e21964 100644 --- a/demo/out/assets/graphite.css +++ b/demo/out/assets/graphite.css @@ -155,8 +155,26 @@ pre { line-height: 1.4; } +/* Markdown renderers tend to wrap code blocks in
     ... 
    blocks. */ +pre code { + margin: 0; + padding: 0; + white-space: pre; + border: none; + border-radius: 0; + background-color: #f8f8f8; +} + h1 code { - font-size: 28px; + font-size: 26px; +} + +dt pre { + margin: 0 2px; + padding: 1px 5px; + border: 1px solid #e8e8e8; + border-radius: 3px; + background-color: #f8f8f8; } /** @@ -209,6 +227,11 @@ sup a { border-bottom: none; } +dt a { + padding-bottom: 0; +} + + /** * Miscellanea */ @@ -324,6 +347,9 @@ body { .main .title .subtitle { font-style: italic; text-align: center; + width: 90%; + margin-left: auto; + margin-right: auto; } .main .title hr { @@ -505,7 +531,6 @@ body.extra-deflist-vspace dt { /* Tablet screens and smaller. */ @media screen and (max-width: 960px) { - body { width: auto; max-width: 680px; @@ -657,7 +682,6 @@ body.extra-deflist-vspace dt { /* Portrait phone screens. */ @media screen and (max-width: 480px) { - body { font-size: 16px; padding-top: 40px; @@ -675,6 +699,10 @@ body.extra-deflist-vspace dt { font-size: 16px; } + h1 code { + font-size: 24px; + } + pre, code { font-size: 12px; } @@ -682,4 +710,8 @@ body.extra-deflist-vspace dt { .small { font-size: 15px; } + + .main .title .subtitle { + width: auto; + } } diff --git a/demo/out/code.html b/demo/out/code.html index 3c7b340..7ac4ec9 100644 --- a/demo/out/code.html +++ b/demo/out/code.html @@ -12,9 +12,9 @@
    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    @@ -52,7 +52,7 @@

    Code Test

    // This is a comment. int main(int argc, char *argv[]) { - printf("hello world\n"); + printf("hello world\n"); return 0; } @@ -60,12 +60,12 @@

    Code Test

    C with syntax-highlighting:

    -#include <stdio.h>
    +#include <stdio.h>
     
     // This is a comment.
    -int main(int argc, char *argv[]) {
    -    printf("hello world\n");
    -    return 0;
    +int main(int argc, char *argv[]) {
    +    printf("hello world\n");
    +    return 0;
     }
     

    @@ -103,10 +103,10 @@

    Code Test

    Django template syntax with syntax-highlighting:

    -{% for post in posts %}
    +{% for post in posts %}
         <h1>{{ post.title }}</h1>
         <p>{{ post.content|striptags|truncatewords:50 }}</p>
    -{% endfor %}
    +{% endfor %}
     
    diff --git a/demo/out/images.html b/demo/out/images.html index 27b53d4..60d3c8e 100644 --- a/demo/out/images.html +++ b/demo/out/images.html @@ -12,9 +12,9 @@
    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    diff --git a/demo/out/index.html b/demo/out/index.html index a3ef55f..d6dfcca 100644 --- a/demo/out/index.html +++ b/demo/out/index.html @@ -3,7 +3,7 @@ - Ivy Demo + Ark Demo @@ -12,9 +12,9 @@
    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    @@ -80,7 +80,7 @@

    int main(int argc, char *argv[]) { - printf("hello world\n"); + printf("hello world\n"); return 0; } @@ -91,12 +91,12 @@

    consequat.

    -#include <stdio.h>
    +#include <stdio.h>
     
    -int main(int argc, char *argv[])
    +int main(int argc, char *argv[])
     {
    -    printf("hello world\n");
    -    return 0;
    +    printf("hello world\n");
    +    return 0;
     }
     

    diff --git a/demo/out/parent.html b/demo/out/parent.html index 5163c4c..4292f9a 100644 --- a/demo/out/parent.html +++ b/demo/out/parent.html @@ -12,9 +12,9 @@

    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    diff --git a/demo/out/parent/child-one.html b/demo/out/parent/child-one.html index 22650db..c4763c9 100644 --- a/demo/out/parent/child-one.html +++ b/demo/out/parent/child-one.html @@ -12,9 +12,9 @@
    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    diff --git a/demo/out/parent/child-two.html b/demo/out/parent/child-two.html index e1d6e88..0db420a 100644 --- a/demo/out/parent/child-two.html +++ b/demo/out/parent/child-two.html @@ -12,9 +12,9 @@
    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    diff --git a/demo/out/short.html b/demo/out/short.html index 8da5d43..70b21ce 100644 --- a/demo/out/short.html +++ b/demo/out/short.html @@ -12,9 +12,9 @@
    -

    Ivy Demo

    +

    Ark Demo

    -

    Ivy is a static website generator built in Python. It transforms a directory of +

    Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website.

    diff --git a/demo/src/index.stx b/demo/src/index.stx index 53933df..897a572 100644 --- a/demo/src/index.stx +++ b/demo/src/index.stx @@ -1,7 +1,7 @@ --- title: Page Title subtitle: This page has a subtitle. -meta-title: Ivy Demo +meta-title: Ark Demo --- Lorem ipsum dolor sit amet, consectetur [adipiscing elit](#), sed do eiusmod diff --git a/docs/config.py b/docs/config.py index 3b4f32c..eaff612 100644 --- a/docs/config.py +++ b/docs/config.py @@ -2,8 +2,6 @@ # Site Configuration File # # ------------------------- # -title = "Ivy" - +title = "Ark" tagline = "A static website generator for people who enjoy the simpler things in life." - -version = "Version 6.5.0" +version = "Version 7.0.0" diff --git a/docs/inc/menu.stx b/docs/inc/menu.stx index e09e419..029538a 100644 --- a/docs/inc/menu.stx +++ b/docs/inc/menu.stx @@ -9,5 +9,5 @@ * [FAQ](@root/faq//) * [Changelog](@root/changelog//) * [License](@root/license//) -* [Github](https://github.com/dmulholl/ivy) +* [Github](https://github.com/dmulholl/ark) diff --git a/docs/out/assets/graphite.css b/docs/out/assets/graphite.css index 06079d5..6e21964 100644 --- a/docs/out/assets/graphite.css +++ b/docs/out/assets/graphite.css @@ -169,6 +169,14 @@ h1 code { font-size: 26px; } +dt pre { + margin: 0 2px; + padding: 1px 5px; + border: 1px solid #e8e8e8; + border-radius: 3px; + background-color: #f8f8f8; +} + /** * Lists */ @@ -339,6 +347,9 @@ body { .main .title .subtitle { font-style: italic; text-align: center; + width: 90%; + margin-left: auto; + margin-right: auto; } .main .title hr { @@ -520,7 +531,6 @@ body.extra-deflist-vspace dt { /* Tablet screens and smaller. */ @media screen and (max-width: 960px) { - body { width: auto; max-width: 680px; @@ -672,7 +682,6 @@ body.extra-deflist-vspace dt { /* Portrait phone screens. */ @media screen and (max-width: 480px) { - body { font-size: 16px; padding-top: 40px; @@ -701,4 +710,8 @@ body.extra-deflist-vspace dt { .small { font-size: 15px; } + + .main .title .subtitle { + width: auto; + } } diff --git a/docs/out/changelog.html b/docs/out/changelog.html index 01ba6b6..18fbfae 100644 --- a/docs/out/changelog.html +++ b/docs/out/changelog.html @@ -3,7 +3,7 @@ - Ivy — Changelog + Ark — Changelog @@ -12,12 +12,12 @@
    -

    Ivy

    +

    Ark

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

    -

    Version 6.5.0

    +

    Version 7.0.0

@@ -72,7 +72,15 @@

Changelog


-

+

+7.0.0 +

+
    +
  • +Name change! The application's name, formerly Ivy, has reverted to its original name, Ark. +
  • +
+

6.4.0

    diff --git a/docs/out/configuration.html b/docs/out/configuration.html deleted file mode 100644 index 114ef17..0000000 --- a/docs/out/configuration.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - Ivy — Configuration Options - - - - - - - -
    -

    Ivy

    - -

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

    - - -

    Version 6.3.0

    - - -
    -
    -
    -

    Configuring Ivy

    - -
    -
    - -

    -Site Configuration File -

    -

    -By default, Ivy searches for a site configuration file called either site.py or config.py. -You can specify a custom filename for the site configuration file using the IVY_CONFIG_FILE environment variable, e.g. -

    -
    -IVY_CONFIG_FILE="site_config.py"
    -
    -

    -This variable takes a colon-separated list of valid filenames. -

    -

    -Directory Names -

    -

    -By default, Ivy uses directories named ext, int, lib, out, res, and src. -

    -

    -You can customize these default directory names using environment variables, e.g. -

    -
    -IVY_EXT_DIR="plugins"
    -IVY_INC_DIR="includes"
    -IVY_LIB_DIR="themes"
    -IVY_OUT_DIR="output"
    -IVY_RES_DIR="resources"
    -IVY_SRC_DIR="source"
    -
    -

    -Alternatively, you can customize directory names on a per-site basis by specifying alternate names in your site configuration file, e.g. -

    -
    -ext_dir = "plugins"
    -inc_dir = "includes"
    -lib_dir = "themes"
    -out_dir = "output"
    -res_dir = "resources"
    -src_dir = "source"
    -
    -

    -Custom File Extensions -

    -

    -You can specify a custom file extension for output files in your site configuration file, e.g. -

    -
    -file_extension = ".txt"
    -
    -

    -Directory-Style URLs -

    -

    -You can generate directory-style URLs — i.e. URLs ending in a forward slash — by setting a custom file extension of "/" in your site configuration file: -

    -
    -file_extension = "/"
    -
    -

    -Absolute URLs -

    -

    -Ivy generates page-relative URLs by default. -

    -

    -You can generate absolute URLs by specifying an explicit root URL in your site configuration file, e.g. -

    -
    -root_url = "http://example.com/"
    -
    -

    -Site-Relative URLs -

    -

    -Ivy generates page-relative URLs by default. -

    -

    -You can generate site-relative URLs — i.e. URLs that begin with a / — by specifying a root URL of "/" in your site configuration file: -

    -
    -root_url = "/"
    -
    -
    - - - diff --git a/docs/out/extensions.html b/docs/out/extensions.html index d1f218a..ce940d9 100644 --- a/docs/out/extensions.html +++ b/docs/out/extensions.html @@ -3,7 +3,7 @@ - Ivy — Extensions + Ark — Extensions @@ -12,12 +12,12 @@
    -

    Ivy

    +

    Ark

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

    -

    Version 6.5.0

    +

    Version 7.0.0

@@ -126,12 +126,12 @@

Installing Extensions

-An extension (also known as a plugin) is a Python module or package that extends Ivy's functionality. You can install extensions for a site in one of two ways. +An extension (also known as a plugin) is a Python module or package that extends Ark's functionality. You can install extensions for a site in one of two ways.

  • -You can add an extensions directory named ext to your site's root directory. Extension modules placed in this ext directory will be loaded automatically by Ivy. +You can add an extensions directory named ext to your site's root directory. Extension modules placed in this ext directory will be loaded automatically by Ark.

  • @@ -153,13 +153,13 @@

    Event & Filter Hooks

    -Ivy exports a flexible framework of event and filter hooks. Plugins can extend Ivy by registering callback functions on these hooks. +Ark exports a flexible framework of event and filter hooks. Plugins can extend Ark by registering callback functions on these hooks.

    -Most of Ivy's default functionality — e.g. support for Jinja templates or Markdown files — is implemented by a set of bundled plugins which make use of this hook system. If you want to extend Ivy yourself you'll probably want to start by taking at look at how they work. +Most of Ark's default functionality — e.g. support for Jinja templates or Markdown files — is implemented by a set of bundled plugins which make use of this hook system. If you want to extend Ark yourself you'll probably want to start by taking at look at how they work.

    -You can find these bundled plugins in the ivy/ext/ directory which you can view on Github. +You can find these bundled plugins in the ark/ext/ directory which you can view on Github.

    Events @@ -171,14 +171,14 @@

    Here's a simple event callback that prints a count of the number of pages that have been written to disk:

    -from ivy.events import Event
    +from ark.events import Event
     
    -@ivy.events.register(Event.EXIT)
    +@ark.events.register(Event.EXIT)
     def print_page_count():
    -    print(ivy.site.pages_written())
    +    print(ark.site.pages_written())
     

    -This callback is registered on the EXIT event hook which fires just before the application exits. (The EXIT event hook can be found in the ivy/__init__.py file.) +This callback is registered on the EXIT event hook which fires just before the application exits. (The EXIT event hook can be found in the ark/__init__.py file.)

    Filters @@ -190,14 +190,14 @@

    Here's a simple filter callback that changes every instance of the word foo in node content to bar:

    -from ivy.filters import Filter
    +from ark.filters import Filter
     
    -@ivy.filters.register(Filter.NODE_TEXT)
    +@ark.filters.register(Filter.NODE_TEXT)
     def foo_to_bar(text, node):
         return text.replace('foo', 'bar')
     

    -This callback is registered on the NODE_TEXT filter hook which fires just before a node's text is rendered into HTML. (The NODE_TEXT filter hook can be found in the ivy/nodes.py file). +This callback is registered on the NODE_TEXT filter hook which fires just before a node's text is rendered into HTML. (The NODE_TEXT filter hook can be found in the ark/nodes.py file).

    Note that this hook supplies us with the Node instance itself as an additional argument which in this case we ignore. @@ -206,7 +206,7 @@

    Rendering & Parsing Engines

    -Ivy relies for most of its functionality on a suite of pluggable rendering and parsing engines, e.g. the Jinja template-engine for handling .jinja template files. Extensions can register support for additional rendering and parsing engines using a system of @register decorators. +Ark relies for most of its functionality on a suite of pluggable rendering and parsing engines, e.g. the Jinja template-engine for handling .jinja template files. Extensions can register support for additional rendering and parsing engines using a system of @register decorators.

    Template Engines @@ -215,10 +215,10 @@

    Template-engines produce the output HTML for finished .html pages in the site.

    -Ivy has builtin support for Jinja and Ibis templates. Extensions can register support for additional template-engines using the @ivy.templates.register() decorator. Template-engine callbacks are registered per template-file-extension, e.g. +Ark has builtin support for Jinja and Ibis templates. Extensions can register support for additional template-engines using the @ark.templates.register() decorator. Template-engine callbacks are registered per template-file-extension, e.g.

    -@ivy.templates.register('jinja')
    +@ark.templates.register('jinja')
     def jinja_callback(page_data, template_filename):
         ...
         return html
    @@ -233,10 +233,10 @@ 

    Rendering-engines convert node content into HTML which can then be poured into a template to produce the finished .html output page.

    -Ivy has builtin support for node files written in Markdown and Syntext. Extensions can register support for additional input formats using the @ivy.renderers.register() decorator. Rendering-engine callbacks are registered per file-extension, e.g. +Ark has builtin support for node files written in Markdown and Syntext. Extensions can register support for additional input formats using the @ark.renderers.register() decorator. Rendering-engine callbacks are registered per file-extension, e.g.

    -@ivy.renderers.register('md')
    +@ark.renderers.register('md')
     def markdown_callback(text):
         ...
         return html
    @@ -251,12 +251,12 @@ 

    Node Metadata

    -Ivy has builtin support for YAML file headers. Extensions can add support for additional metadata formats by preprocessing file content on the file_text filter hook. +Ark has builtin support for YAML file headers. Extensions can add support for additional metadata formats by preprocessing file content on the file_text filter hook.

    -from ivy.filters import Filter
    +from ark.filters import Filter
     
    -@ivy.filters.register(Filter.FILE_TEXT)
    +@ark.filters.register(Filter.FILE_TEXT)
     def parse_toml_header(raw_text, meta_dict):
         ...
         return filtered_text
    @@ -265,7 +265,7 @@ 

    This filter fires each time a node file is loaded from disk; it passes the raw file text along with a metadata dictionary. Callbacks can check the text for an appropriate header marker, process the header if found, and update the dictionary. They should return the text with the header stripped.

    -The FILE_TEXT filter hook can be found in the ivy/utils.py file. +The FILE_TEXT filter hook can be found in the ark/utils.py file.

    Bundled Extension Settings @@ -274,7 +274,7 @@

    Markdown

    -Ivy uses the Markdown package to render node files with a .md extension. You can add a +Ark uses the Markdown package to render node files with a .md extension. You can add a dictionary of keyword arguments for the Markdown renderer to your site configuration file via a markdown_settings attribute, e.g.

    @@ -293,7 +293,7 @@

    Syntext

    -Ivy uses the Syntext package to render node files with a .stx extension. You can add a dictionary of keyword arguments for the Syntext renderer to your site configuration file via a syntext_settings attribute, e.g. +Ark uses the Syntext package to render node files with a .stx extension. You can add a dictionary of keyword arguments for the Syntext renderer to your site configuration file via a syntext_settings attribute, e.g.

     syntext_settings = {
    @@ -304,7 +304,7 @@ 

    Jinja

    -Ivy uses the Jinja package to render template files with a .jinja extension. You can add a +Ark uses the Jinja package to render template files with a .jinja extension. You can add a dictionary of keyword arguments for the Jinja environment to your site configuration file via a jinja_settings attribute.

    @@ -312,7 +312,7 @@

    Shortcodes

    -Ivy uses the Shortcodes package to process shortcodes in node files. You can add a dictionary of +Ark uses the Shortcodes package to process shortcodes in node files. You can add a dictionary of keyword arguments for the shortcode parser to your site configuration file via a shortcode_settings attribute.

    diff --git a/docs/out/faq.html b/docs/out/faq.html index bf56c17..055881a 100644 --- a/docs/out/faq.html +++ b/docs/out/faq.html @@ -3,7 +3,7 @@ - Ivy — FAQ + Ark — FAQ @@ -12,12 +12,12 @@
    -

    Ivy

    +

    Ark

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

    -

    Version 6.5.0

    +

    Version 7.0.0

  • -Github +Github
@@ -74,25 +74,22 @@

FAQ

-

-Is Ivy fast? +

+Is Ark fast?

-No. Ivy is designed to be easy to use, with lots of flexibility under the hood if you're prepared to write a little extension code. Execution speed isn't a significant design goal as it's simply irrelevant for the kind of small personal or project websites Ivy is intended to be used for. +No. Ark is designed to be easy to use, with lots of flexibility under the hood if you're prepared to write a little extension code. Execution speed isn't a significant design goal as it's simply irrelevant for the kind of small personal or project websites Ark is intended to be used for.

-As a rough benchmark, a clean (no-cache) build of the Ivy demo site which contains 7 output pages takes 0.15 seconds on my laptop. +As a rough benchmark, a clean (no-cache) build of the Ark demo site which contains 7 output pages takes 0.15 seconds on my laptop. A clean build of the Holly demo site which contains 951 output pages takes 1.7 seconds. This means that on my particular hardware I can expect a throughput of roughly 500 pages per second.

-If you need to build a website with tens or hundreds of thousands of pages, Ivy probably isn't the right tool for you. +If you need to build a website with tens or hundreds of thousands of pages, Ark probably isn't the right tool for you. Hugo is a popular static site generator with a focus on execution speed that may be a better match for large sites.

-

-Can I build a blog using Ivy? +

+Can I build a blog using Ark?

-Holly is a blog-engine plugin for Ivy. It adds support for WordPress-style post and tag indexes. +Holly is a blog-engine plugin for Ark. It adds support for WordPress-style post and tag indexes.

Where do I put my image files? @@ -146,33 +143,33 @@

 @root/images/photo.jpg
 
-

-Ivy has no special support for WordPress-style featured images but we can implement similar functionality simply by adding the image name as an attribute to the page header, e.g. +Ark has no special support for WordPress-style featured images but we can implement similar functionality simply by adding the image name as an attribute to the page header, e.g.

----
-title: Page Title
-image: photo.jpg
----
+---
+title: Page Title
+image: photo.jpg
+---
 

We can then check for the presence of a featured image in the appropriate template file:

-{% if node.image %}
+{% if node.image %}
     <img src="@root/images/{{node.image}}">
-{% endif %}
+{% endif %}
 

YAML supports lists so we can implement galleries in a similar manner by adding a list of image names to the header and then iterating over the list in the template file:

-{% for image in node.gallery %}
+{% for image in node.gallery %}
     <img src="@root/images/{{image}}">
-{% endfor %}
+{% endfor %}
 

Why do I get an error when I add a URL to a YAML header? @@ -186,15 +183,10 @@

---

-Quoting the URL solves the problem: +Wrapping the URL in double quotes solves the problem.

-
----
-image: "images/photo.jpg"
----
-
-

-How do I deploy a site built with Ivy? +

+How do I deploy a site built with Ark?

One of the nicest things about a static website is that it's completely independent of the tool used to build it. You can host your website anywhere you like — in the simplest case you can 'deploy' it simply by double-clicking on the .html files to view them locally in your browser. @@ -219,12 +211,6 @@

-

-Why is it called Ivy? -

-

-I liked the name Industrial Vellum, IV. Also, the branching tree structure of the nodes reminded me of ivy. -

Can I disable a node?

@@ -237,7 +223,7 @@

---

-This will stop Ivy from producing an output HTML page for the node. +This will stop Ark from producing an output HTML page for the node.

Note that this only affects the node itself, not its children. @@ -246,13 +232,13 @@

Can I use a different Markdown library?

-Sure. Ivy defaults to using the Markdown library to render .md files but you can register a custom handler to use any library you like. +Sure. Ark defaults to using the Markdown library to render .md files but you can register a custom handler to use any library you like.

Can I use LaTeX markup?

-Here's a simple demo of an Ivy site using the KaTeX JavaScript library to render LaTeX markup. +Here's a simple demo of an Ark site using the KaTeX JavaScript library to render LaTeX markup.

diff --git a/docs/out/index.html b/docs/out/index.html index f01df76..86fe1ea 100644 --- a/docs/out/index.html +++ b/docs/out/index.html @@ -3,23 +3,23 @@ - Ivy — a static website generator in Python + Ark — a static website generator in Python - +
-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -75,14 +75,14 @@

Home


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

-$ ivy --help
+$ ark --help
 
-Usage: ivy [command]
+Usage: ark [command]
 
-  Ivy is a static website generator. It transforms a
+  Ark is a static website generator. It transforms a
   directory of text files into a self-contained website.
 
 Flags:
@@ -102,41 +102,41 @@ 

Home

help <command> Print the command's help text.

-You can build many different kinds of website using Ivy but it's particularly suited to building project documentation like the documentation you're looking at right now. +You can build many different kinds of website using Ark but it's particularly suited to building project documentation like the documentation you're looking at right now.

Formats

-Ivy has builtin support for content written in Markdown, Syntext, or plain HTML, but Ivy itself is format-agnostic — you can write your content in any format with a suitable Python library. +Ark has builtin support for content written in Markdown, Syntext, or plain HTML, but Ark itself is format-agnostic — you can write your content in any format with a suitable Python library.

-Similarly, Ivy has builtin support for Jinja and Ibis templates but can use any template language with a suitable Python library. +Similarly, Ark has builtin support for Jinja and Ibis templates but can use any template language with a suitable Python library.

Installation

-Install Ivy from the Python Package Index using pip: +Install Ark from the Python Package Index using pip:

-$ pip install ivy
+$ pip install ark
 

-Ivy requires Python 3.10 or later. +Ark requires Python 3.10 or later.

diff --git a/docs/out/license.html b/docs/out/license.html index 1031481..ff554ae 100644 --- a/docs/out/license.html +++ b/docs/out/license.html @@ -3,7 +3,7 @@ - Ivy — License + Ark — License @@ -12,12 +12,12 @@
-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -72,11 +72,11 @@

License


-

-Ivy +

+Ark

-All of Ivy's code has been placed in the public domain and is free for personal and commercial use. No attribution is required. +All of Ark's code has been placed in the public domain and is free for personal and commercial use. No attribution is required.

 This is free and unencumbered software released into the
diff --git a/docs/out/options.html b/docs/out/options.html
index 7f4f04f..06eaf4c 100644
--- a/docs/out/options.html
+++ b/docs/out/options.html
@@ -3,7 +3,7 @@
     
         
         
-        Ivy — Configuration Options
+        Ark — Configuration Options
         
         
         
@@ -12,12 +12,12 @@
     
     
         
-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

-

Configuring Ivy

+

Configuring Ark


@@ -96,11 +96,11 @@

Site Configuration File

-By default, Ivy searches for a site configuration file called either site.py or config.py. -You can specify a custom filename for the site configuration file using the IVY_CONFIG_FILE environment variable, e.g. +By default, Ark searches for a site configuration file called either site.py or config.py. +You can specify a custom filename for the site configuration file using the ARK_CONFIG_FILE environment variable, e.g.

-IVY_CONFIG_FILE="site_config.py"
+ARK_CONFIG_FILE="site_config.py"
 

This variable takes a colon-separated list of filenames. @@ -109,18 +109,18 @@

Directory Names

-By default, Ivy uses directories named ext, inc, lib, out, res, and src. +By default, Ark uses directories named ext, inc, lib, out, res, and src.

You can customize these default directory names using environment variables, e.g.

-IVY_EXT_DIR="plugins"
-IVY_INC_DIR="includes"
-IVY_LIB_DIR="themes"
-IVY_OUT_DIR="output"
-IVY_RES_DIR="resources"
-IVY_SRC_DIR="source"
+ARK_EXT_DIR="plugins"
+ARK_INC_DIR="includes"
+ARK_LIB_DIR="themes"
+ARK_OUT_DIR="output"
+ARK_RES_DIR="resources"
+ARK_SRC_DIR="source"
 

Alternatively, you can customize directory names on a per-site basis by specifying alternate names in your site configuration file, e.g. @@ -137,7 +137,7 @@

Custom File Extensions

-Ivy generates output pages with a .html file extension by default. +Ark generates output pages with a .html file extension by default.

You can specify a custom file extension for output files in your site configuration file, e.g. @@ -158,7 +158,7 @@

Absolute URLs

-Ivy generates page-relative URLs by default. +Ark generates page-relative URLs by default.

You can generate absolute URLs by specifying an explicit root URL in your site configuration file, e.g. @@ -170,7 +170,7 @@

Site-Relative URLs

-Ivy generates page-relative URLs by default. +Ark generates page-relative URLs by default.

You can generate site-relative URLs — i.e. URLs that begin with a / — by specifying a root URL of "/" in your site configuration file: diff --git a/docs/out/quickstart.html b/docs/out/quickstart.html index 45b6577..11e52d7 100644 --- a/docs/out/quickstart.html +++ b/docs/out/quickstart.html @@ -3,7 +3,7 @@ - Ivy — Quickstart Tutorial + Ark — Quickstart Tutorial @@ -12,12 +12,12 @@

-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -73,13 +73,13 @@

Quickstart Tutorial


-Install Ivy from the Python Package Index using pip: +Install Ark from the Python Package Index using pip:

-$ pip install ivy
+$ pip install ark
 

-Once Ivy is installed, create a new directory for your site and cd into it: +Once Ark is installed, create a new directory for your site and cd into it:

 $ mkdir mysite
@@ -89,10 +89,10 @@ 

Quickstart Tutorial

Initialize the site directory using the init command:

-$ ivy init
+$ ark init
 

-Ivy will create the following directory structure for your site: +Ark will create the following directory structure for your site:

 mysite/
@@ -102,34 +102,34 @@ 

Quickstart Tutorial

|-- site.py # site configuration file

-Ivy initializes your src directory with a simple skeleton site which you can build immediately using the build command: +Ark initializes your src directory with a simple skeleton site which you can build immediately using the build command:

-$ ivy build
+$ ark build
 

-You can run the build command from the site directory itself or from any of its subdirectories. It tells Ivy to render the text files in the src directory into HTML and place the output in an out directory. +You can run the build command from the site directory itself or from any of its subdirectories. It tells Ark to render the text files in the src directory into HTML and place the output in an out directory.

-Run the build command and take a look at the output. You can open the HTML files directly in your browser or use Ivy's builtin test server to serve the contents of the out directory: +Run the build command and take a look at the output. You can open the HTML files directly in your browser or use Ark's builtin test server to serve the contents of the out directory:

-$ ivy serve
+$ ark serve
 

This command will start the test server and automatically launch the default web browser to view the site. Hit Ctrl-C when you want to shut the server down.

-Ivy will build the site using its default graphite theme, which you can find in the lib folder. Try rebuilding the site using the debug theme which is less pretty but provides a lot of useful information that can help you when building or customizing your own themes: +Ark will build the site using its default graphite theme, which you can find in the lib folder. Try rebuilding the site using the debug theme which is less pretty but provides a lot of useful information that can help you when building or customizing your own themes:

-$ ivy build --theme debug
+$ ark build --theme debug
 

-You can run ivy --help to see a list of all the available commands. Note that you can get help for a specific command by running +You can run ark --help to see a list of all the available commands. Note that you can get help for a specific command by running

-$ ivy help <command>
+$ ark help <command>
 

replacing <command> with the command name. diff --git a/docs/out/resources.html b/docs/out/resources.html index 9c9932a..c32b071 100644 --- a/docs/out/resources.html +++ b/docs/out/resources.html @@ -3,7 +3,7 @@ - Ivy — Resources + Ark — Resources @@ -12,12 +12,12 @@

-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -92,7 +92,7 @@

Resources

-This blog-engine plugin turns Ivy into a WordPress-style blog generator with support for post and tag indexes. +This blog-engine plugin turns Ark into a WordPress-style blog generator with support for post and tag indexes.

https://github.com/dmulholl/holly @@ -105,7 +105,7 @@

Resources

-A clean, responsive, text-focused theme for Ivy. +A clean, responsive, text-focused theme for Ark. This is the theme I use for my own personal website.

@@ -119,8 +119,8 @@

Resources

-A simple, single-column theme for Ivy. -This was the original theme for Ivy's documentation. +A simple, single-column theme for Ark. +This was the original theme for Ark's documentation.

https://github.com/dmulholl/vanilla @@ -133,7 +133,7 @@

Resources

-A blog-style theme for Ivy based on the classic WordPress theme of the same name. +A blog-style theme for Ark based on the classic WordPress theme of the same name.

https://github.com/dmulholl/twentyfifteen diff --git a/docs/out/shortcodes.html b/docs/out/shortcodes.html index 5b80a71..c295450 100644 --- a/docs/out/shortcodes.html +++ b/docs/out/shortcodes.html @@ -3,7 +3,7 @@ - Ivy — Shortcodes + Ark — Shortcodes @@ -12,12 +12,12 @@

-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -73,7 +73,7 @@

Shortcodes


-Ivy has builtin support for WordPress-style shortcodes in node content. These shortcodes can have space-separated positional and keyword arguments: +Ark has builtin support for WordPress-style shortcodes in node content. These shortcodes can have space-separated positional and keyword arguments:

 [% tag arg1 key=arg2 %]
@@ -86,7 +86,7 @@ 

Shortcodes are implemented by the shortcodes package, an external library. -An Ivy extension can register a new shortcode tag using the shortcode package's @register() decorator: +An Ark extension can register a new shortcode tag using the shortcode package's @register() decorator:

 import shortcodes
@@ -134,12 +134,12 @@ 

Here's a sample shortcode you could use to inject the raw content of a file from the site's includes directory, inc, directly into a node file:

-import ivy
+import ark
 import shortcodes
 
 @shortcodes.register('include_raw')
 def handler(pargs, kwargs, node):
-    path = ivy.site.inc(pargs[0])
+    path = ark.site.inc(pargs[0])
     with open(path) as file:
         return file.read()
 
@@ -156,15 +156,15 @@

Example — include_rendered

-Ivy already loads and renders the content of files from the includes directory to make it available in template files. What if you want to include this pre-rendered content in a node file? +Ark already loads and renders the content of files from the includes directory to make it available in template files. What if you want to include this pre-rendered content in a node file?

-import ivy
+import ark
 import shortcodes
 
 @shortcodes.register('include_rendered')
 def handler(pargs, kwargs, node):
-    includes = ivy.site.includes()
+    includes = ark.site.includes()
     return includes[pargs[0]]
 

@@ -183,13 +183,13 @@

This is a handy shortcode for building sitemaps — it assembles a list of links to all the children of a target node:

-import ivy
+import ark
 import shortcodes
 
 @shortcodes.register('list_children')
 def handler(pargs, kwargs, node):
     links = []
-    target_node = ivy.nodes.node(pargs[0])
+    target_node = ark.nodes.node(pargs[0])
     for child in target_node.children:
         title = child.get('title') or 'Missing Title'
         links.append(f'* [{title}]({child.url})')
@@ -211,7 +211,7 @@ 

Here's an example of a block-level shortcode wrapping a block of content. Imagine we want to add special styling to quotes with the name of the quote's author attached:

-import ivy
+import ark
 import shortcodes
 
 @shortcodes.register('quote', 'endquote')
diff --git a/docs/out/sites.html b/docs/out/sites.html
index 85a6684..98f5b05 100644
--- a/docs/out/sites.html
+++ b/docs/out/sites.html
@@ -3,7 +3,7 @@
     
         
         
-        Ivy — Building Websites
+        Ark — Building Websites
         
         
         
@@ -12,12 +12,12 @@
     
     
         
-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -108,22 +108,22 @@

To initialize a new site, create a site directory, cd into it, and run the init command:

-$ ivy init
+$ ark init
 

To build an existing site, run the build command from the site directory or any of its subdirectories:

-$ ivy build
+$ ark build
 

-Use the ivy --help flag to view the full command-line help text. +Use the ark --help flag to view the full command-line help text.

Site Structure

-Ivy assumes that a site uses the following default directory structure: +Ark assumes that a site uses the following default directory structure:

 site/
@@ -136,7 +136,7 @@ 

|-- site.py # site configuration file

-Ivy uses the presence of a site.py file (alternatively, a config.py file) to identify a site's home directory. +Ark uses the presence of a site.py file (alternatively, a config.py file) to identify a site's home directory.

Static assets such as image files should be placed in the site's resources directory, res. The content of this directory is copied to the output directory when the site is built. @@ -145,7 +145,7 @@

Nodes

-A node is a text file or directory stored in a site's src directory. Ivy parses the src directory into a tree of nodes which it then renders into a website, generating a single HTML page in the out directory for each node in the tree. +A node is a text file or directory stored in a site's src directory. Ark parses the src directory into a tree of nodes which it then renders into a website, generating a single HTML page in the out directory for each node in the tree.

A node file can begin with a YAML header specifying metadata for the node: @@ -185,7 +185,7 @@

Metadata

-Ivy has builtin support for node metadata in YAML format. Note that metadata keys are converted to lowercase and spaces and hyphens are replaced by underscores so the YAML attribute: +Ark has builtin support for node metadata in YAML format. Note that metadata keys are converted to lowercase and spaces and hyphens are replaced by underscores so the YAML attribute:

 ---
@@ -234,7 +234,7 @@ 
 

-Ivy generates page-relative URLs and files with a .html extension by default. +Ark generates page-relative URLs and files with a .html extension by default.

To link to files within your site from nodes or templates use site-relative URLs prefixed by @root/, e.g. @@ -243,10 +243,10 @@

-Ivy will automatically rewrite these URLs in the appropriate format. +Ark will automatically rewrite these URLs in the appropriate format.

-Use two trailing slashes when linking to pages generated by Ivy itself — this tells Ivy to rewrite the ending to suit your extension settings. +Use two trailing slashes when linking to pages generated by Ark itself — this tells Ark to rewrite the ending to suit your extension settings.

 @root/posts/my-post//
@@ -269,13 +269,13 @@ 

---

-Slugs can be customized sitewide by registering a filter callback on the Filter.SLUGIFY filter hook. (You can find this hook in the ivy/utils.py file.) +Slugs can be customized sitewide by registering a filter callback on the Filter.SLUGIFY filter hook. (You can find this hook in the ark/utils.py file.)

Classes

-Ivy automatically generates a list of useful CSS classes for each page's <body> element based on the page's URL slugs. For example the page with the URL: +Ark automatically generates a list of useful CSS classes for each page's <body> element based on the page's URL slugs. For example the page with the URL:

 @root/foo/bar/baz//
@@ -340,7 +340,7 @@ 

---

-This isn't really a feature of Ivy itself — the default theme simply checks for these attributes in its template files and you can add similar support to your own custom themes. +This isn't really a feature of Ark itself — the default theme simply checks for these attributes in its template files and you can add similar support to your own custom themes.

diff --git a/docs/out/themes.html b/docs/out/themes.html index fcd5da5..dddc2a3 100644 --- a/docs/out/themes.html +++ b/docs/out/themes.html @@ -3,7 +3,7 @@ - Ivy — Themes + Ark — Themes @@ -12,12 +12,12 @@
-

Ivy

+

Ark

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

-

Version 6.5.0

+

Version 7.0.0

@@ -73,7 +73,7 @@

Themes


-Ivy borrows its idea of themes from WordPress where a theme is a directory of templates, styles, and scripts that together provide the look and feel for a site. +Ark borrows its idea of themes from WordPress where a theme is a directory of templates, styles, and scripts that together provide the look and feel for a site.

A site's theme is completely independent of its content. @@ -91,16 +91,16 @@

theme = "graphite"

-Ivy ships with a small collection of bundled themes including graphite, the default theme you're looking at right now, and debug, a diagnostic theme useful when designing themes or debugging sites. +Ark ships with a small collection of bundled themes including graphite, the default theme you're looking at right now, and debug, a diagnostic theme useful when designing themes or debugging sites.

Note that you can override the currently active theme with the build command's --theme flag:

-$ ivy build --theme debug
+$ ark build --theme debug
 

-Ivy searches for a named theme first in the site's theme library, then (if it exists) in the global theme library specified by the $IVY_THEMES environment variable. Finally it searches among the default themes bundled with Ivy itself. +Ark searches for a named theme first in the site's theme library, then (if it exists) in the global theme library specified by the $ARK_THEMES environment variable. Finally it searches among the default themes bundled with Ark itself.

Structure @@ -109,7 +109,7 @@

A theme is simply a directory; the theme's name is the name of the directory.

-When building a website, Ivy looks for three subdirectories within the theme directory: resources, templates, and extensions. +When building a website, Ark looks for three subdirectories within the theme directory: resources, templates, and extensions.

@@ -129,7 +129,7 @@

-The templates directory is where Ivy looks for the theme's template files. +The templates directory is where Ark looks for the theme's template files. This directory is also where Jinja and Ibis will look for files included in templates using {% include %} tags.

@@ -140,14 +140,14 @@

-Themes can bundle extensions for Ivy by placing Python modules or packages in the extensions directory. -These will be loaded automatically by Ivy. +Themes can bundle extensions for Ark by placing Python modules or packages in the extensions directory. +These will be loaded automatically by Ark.

-A theme directory can contain other files and directories — e.g. a license file, readme file, etc. — which Ivy will simply ignore. +A theme directory can contain other files and directories — e.g. a license file, readme file, etc. — which Ark will simply ignore.

Template Files @@ -156,7 +156,7 @@

Template files provide the HTML scaffolding for constructing pages — you can think of a template file as the mould into which your content will be poured.

-There are countless templating languages and Ivy can use any of them, but it has builtin support for Jinja and Ibis. Ivy determines the language of a template file by looking at its extension — .jinja for Jinja and .ibis for Ibis. +There are countless templating languages and Ark can use any of them, but it has builtin support for Jinja and Ibis. Ark determines the language of a template file by looking at its extension — .jinja for Jinja and .ibis for Ibis.

You can add support for alternative templating languages via plugins. @@ -165,7 +165,7 @@

Template Hierarchy

-When Ivy generates a HTML page for a node it searches for the appropriate template file to use in reverse order of specificity (most specific first, least specific last). +When Ark generates a HTML page for a node it searches for the appropriate template file to use in reverse order of specificity (most specific first, least specific last).

For example, the node file: @@ -180,7 +180,7 @@

<Node @root/foo/bar/baz//>

-Ivy will search for a template file for this node in the following order: +Ark will search for a template file for this node in the following order:

 1. node-foo-bar-baz.*
@@ -189,7 +189,7 @@ 

4. node.*

-Ultimately, Ivy will always check for a template file called node.* — this is the default template name and the only template file actually required by a theme. +Ultimately, Ark will always check for a template file called node.* — this is the default template name and the only template file actually required by a theme.

A node can override this process by specifying a custom template name in its header: diff --git a/docs/src/changelog.stx b/docs/src/changelog.stx index c53b618..32ccfb6 100644 --- a/docs/src/changelog.stx +++ b/docs/src/changelog.stx @@ -1,12 +1,18 @@ --- title: Changelog -meta_title: Ivy — Changelog +meta_title: Ark — Changelog --- [docs:ibis]: http://www.dmulholl.com/docs/ibis/master/ [docs:shortcodes]: http://www.dmulholl.com/dev/shortcodes.html +### 7.0.0 + +* Name change! The application's name, formerly Ivy, has reverted to its original name, Ark. + + + ### 6.4.0 * Ivy now accepts both `site.py` and `config.py` as valid names for the site configuration file. diff --git a/docs/src/extensions.stx b/docs/src/extensions.stx index 784df42..500be9b 100644 --- a/docs/src/extensions.stx +++ b/docs/src/extensions.stx @@ -1,9 +1,9 @@ --- title: Extensions -meta_title: Ivy — Extensions +meta_title: Ark — Extensions --- -[1]: https://github.com/dmulholl/ivy/tree/main/ivy/extensions +[1]: https://github.com/dmulholl/ark/tree/main/ark/extensions [2]: http://jinja.pocoo.org [3]: https://github.com/dmulholl/ibis [4]: https://en.wikipedia.org/wiki/Markdown @@ -17,9 +17,9 @@ meta_title: Ivy — Extensions ## Installing Extensions -An extension (also known as a plugin) is a Python module or package that extends Ivy's functionality. You can install extensions for a site in one of two ways. +An extension (also known as a plugin) is a Python module or package that extends Ark's functionality. You can install extensions for a site in one of two ways. -(*) You can add an extensions directory named `ext` to your site's root directory. Extension modules placed in this `ext` directory will be loaded automatically by Ivy. +(*) You can add an extensions directory named `ext` to your site's root directory. Extension modules placed in this `ext` directory will be loaded automatically by Ark. (*) If an extension module has been installed on Python's standard import path you can activate it for a particular site by adding its name to an `extensions` list in the site's configuration file: @@ -35,11 +35,11 @@ This second method can be used to enable extensions installed from the Python pa ## Event & Filter Hooks -Ivy exports a flexible framework of event and filter hooks. Plugins can extend Ivy by registering callback functions on these hooks. +Ark exports a flexible framework of event and filter hooks. Plugins can extend Ark by registering callback functions on these hooks. -Most of Ivy's default functionality --- e.g. support for Jinja templates or Markdown files --- is implemented by a set of bundled plugins which make use of this hook system. If you want to extend Ivy yourself you'll probably want to start by taking at look at how they work. +Most of Ark's default functionality --- e.g. support for Jinja templates or Markdown files --- is implemented by a set of bundled plugins which make use of this hook system. If you want to extend Ark yourself you'll probably want to start by taking at look at how they work. -You can find these bundled plugins in the `ivy/ext/` directory which you can view on [Github][1]. +You can find these bundled plugins in the `ark/ext/` directory which you can view on [Github][1]. @@ -50,13 +50,13 @@ You can find these bundled plugins in the `ivy/ext/` directory which you can vie Here's a simple event callback that prints a count of the number of pages that have been written to disk: ::: code python - from ivy.events import Event + from ark.events import Event - @ivy.events.register(Event.EXIT) + @ark.events.register(Event.EXIT) def print_page_count(): - print(ivy.site.pages_written()) + print(ark.site.pages_written()) -This callback is registered on the `EXIT` event hook which fires just before the application exits. (The `EXIT` event hook can be found in the `ivy/__init__.py` file.) +This callback is registered on the `EXIT` event hook which fires just before the application exits. (The `EXIT` event hook can be found in the `ark/__init__.py` file.) @@ -67,13 +67,13 @@ This callback is registered on the `EXIT` event hook which fires just before the Here's a simple filter callback that changes every instance of the word *foo* in node content to *bar*: ::: code python - from ivy.filters import Filter + from ark.filters import Filter - @ivy.filters.register(Filter.NODE_TEXT) + @ark.filters.register(Filter.NODE_TEXT) def foo_to_bar(text, node): return text.replace('foo', 'bar') -This callback is registered on the `NODE_TEXT` filter hook which fires just before a node's text is rendered into HTML. (The `NODE_TEXT` filter hook can be found in the `ivy/nodes.py` file). +This callback is registered on the `NODE_TEXT` filter hook which fires just before a node's text is rendered into HTML. (The `NODE_TEXT` filter hook can be found in the `ark/nodes.py` file). Note that this hook supplies us with the `Node` instance itself as an additional argument which in this case we ignore. @@ -82,7 +82,7 @@ Note that this hook supplies us with the `Node` instance itself as an additional ## Rendering & Parsing Engines -Ivy relies for most of its functionality on a suite of pluggable rendering and parsing engines, e.g. the [Jinja][2] template-engine for handling `.jinja` template files. Extensions can register support for additional rendering and parsing engines using a system of `@register` decorators. +Ark relies for most of its functionality on a suite of pluggable rendering and parsing engines, e.g. the [Jinja][2] template-engine for handling `.jinja` template files. Extensions can register support for additional rendering and parsing engines using a system of `@register` decorators. @@ -90,10 +90,10 @@ Ivy relies for most of its functionality on a suite of pluggable rendering and p Template-engines produce the output HTML for finished `.html` pages in the site. -Ivy has builtin support for [Jinja][2] and [Ibis][3] templates. Extensions can register support for additional template-engines using the `@ivy.templates.register()` decorator. Template-engine callbacks are registered per template-file-extension, e.g. +Ark has builtin support for [Jinja][2] and [Ibis][3] templates. Extensions can register support for additional template-engines using the `@ark.templates.register()` decorator. Template-engine callbacks are registered per template-file-extension, e.g. ::: code python - @ivy.templates.register('jinja') + @ark.templates.register('jinja') def jinja_callback(page_data, template_filename): ... return html @@ -106,10 +106,10 @@ A template-engine callback should accept a dictionary of page data and a templat Rendering-engines convert node content into HTML which can then be poured into a template to produce the finished `.html` output page. -Ivy has builtin support for node files written in [Markdown][4] and [Syntext][6]. Extensions can register support for additional input formats using the `@ivy.renderers.register()` decorator. Rendering-engine callbacks are registered per file-extension, e.g. +Ark has builtin support for node files written in [Markdown][4] and [Syntext][6]. Extensions can register support for additional input formats using the `@ark.renderers.register()` decorator. Rendering-engine callbacks are registered per file-extension, e.g. ::: code python - @ivy.renderers.register('md') + @ark.renderers.register('md') def markdown_callback(text): ... return html @@ -122,19 +122,19 @@ Note that if you register a custom callback for `.md` files, this will override ### Node Metadata -Ivy has builtin support for YAML file headers. Extensions can add support for additional metadata formats by preprocessing file content on the `file_text` filter hook. +Ark has builtin support for YAML file headers. Extensions can add support for additional metadata formats by preprocessing file content on the `file_text` filter hook. ::: code python - from ivy.filters import Filter + from ark.filters import Filter - @ivy.filters.register(Filter.FILE_TEXT) + @ark.filters.register(Filter.FILE_TEXT) def parse_toml_header(raw_text, meta_dict): ... return filtered_text This filter fires each time a node file is loaded from disk; it passes the raw file text along with a metadata dictionary. Callbacks can check the text for an appropriate header marker, process the header if found, and update the dictionary. They should return the text with the header stripped. -The `FILE_TEXT` filter hook can be found in the `ivy/utils.py` file. +The `FILE_TEXT` filter hook can be found in the `ark/utils.py` file. @@ -143,7 +143,7 @@ The `FILE_TEXT` filter hook can be found in the `ivy/utils.py` file. ### Markdown -Ivy uses the [Markdown][5] package to render node files with a `.md` extension. You can add a +Ark uses the [Markdown][5] package to render node files with a `.md` extension. You can add a dictionary of keyword arguments for the Markdown renderer to your site configuration file via a `markdown_settings` attribute, e.g. @@ -160,7 +160,7 @@ Note that you can register a custom handler for `.md` files to use an alternativ ### Syntext -Ivy uses the [Syntext][7] package to render node files with a `.stx` extension. You can add a dictionary of keyword arguments for the Syntext renderer to your site configuration file via a `syntext_settings` attribute, e.g. +Ark uses the [Syntext][7] package to render node files with a `.stx` extension. You can add a dictionary of keyword arguments for the Syntext renderer to your site configuration file via a `syntext_settings` attribute, e.g. ::: code python syntext_settings = { @@ -171,7 +171,7 @@ Ivy uses the [Syntext][7] package to render node files with a `.stx` extension. ### Jinja -Ivy uses the [Jinja][2] package to render template files with a `.jinja` extension. You can add a +Ark uses the [Jinja][2] package to render template files with a `.jinja` extension. You can add a dictionary of keyword arguments for the Jinja environment to your site configuration file via a `jinja_settings` attribute. @@ -179,7 +179,7 @@ dictionary of keyword arguments for the Jinja environment to your site configura ### Shortcodes -Ivy uses the [Shortcodes][8] package to process shortcodes in node files. You can add a dictionary of +Ark uses the [Shortcodes][8] package to process shortcodes in node files. You can add a dictionary of keyword arguments for the shortcode parser to your site configuration file via a `shortcode_settings` attribute. diff --git a/docs/src/faq.stx b/docs/src/faq.stx index 2e65d80..d26d678 100644 --- a/docs/src/faq.stx +++ b/docs/src/faq.stx @@ -1,34 +1,34 @@ --- title: FAQ -meta_title: Ivy — FAQ +meta_title: Ark — FAQ --- -[1]: http://www.dmulholl.com/demos/ivy/ +[1]: http://www.dmulholl.com/demos/ark/ [2]: http://www.dmulholl.com/demos/holly/ [3]: https://pypi.org/project/Markdown/ -[4]: https://github.com/dmulholl/ivy-katex-demo +[4]: https://github.com/dmulholl/ark-katex-demo [5]: https://katex.org ::: insert toc -### Is Ivy fast? +### Is Ark fast? -No. Ivy is designed to be easy to use, with lots of flexibility under the hood if you're prepared to write a little extension code. Execution speed isn't a significant design goal as it's simply irrelevant for the kind of small personal or project websites Ivy is intended to be used for. +No. Ark is designed to be easy to use, with lots of flexibility under the hood if you're prepared to write a little extension code. Execution speed isn't a significant design goal as it's simply irrelevant for the kind of small personal or project websites Ark is intended to be used for. -As a rough benchmark, a clean (no-cache) build of the Ivy [demo site][1] which contains 7 output pages takes 0.15 seconds on my laptop. +As a rough benchmark, a clean (no-cache) build of the Ark [demo site][1] which contains 7 output pages takes 0.15 seconds on my laptop. A clean build of the Holly [demo site][2] which contains 951 output pages takes 1.7 seconds. This means that on my particular hardware I can expect a throughput of roughly 500 pages per second. -If you need to build a website with tens or hundreds of thousands of pages, Ivy probably isn't the right tool for you. +If you need to build a website with tens or hundreds of thousands of pages, Ark probably isn't the right tool for you. [Hugo](https://gohugo.io) is a popular static site generator with a focus on execution speed that may be a better match for large sites. -### Can I build a blog using Ivy? +### Can I build a blog using Ark? -[Holly](https://github.com/dmulholl/holly) is a blog-engine plugin for Ivy. It adds support for WordPress-style post and tag indexes. +[Holly](https://github.com/dmulholl/holly) is a blog-engine plugin for Ark. It adds support for WordPress-style post and tag indexes. @@ -49,9 +49,9 @@ This file will be copied to the output directory and can be accessed in template -### Does Ivy support featured images or image galleries? +### Does Ark support featured images or image galleries? -Ivy has no special support for WordPress-style featured images but we can implement similar functionality simply by adding the image name as an attribute to the page header, e.g. +Ark has no special support for WordPress-style featured images but we can implement similar functionality simply by adding the image name as an attribute to the page header, e.g. ::: code yaml --- @@ -79,19 +79,16 @@ YAML supports lists so we can implement galleries in a similar manner by adding YAML doesn't support unquoted values that begin with an `@` symbol so you'll get an error message if you add a bare `@root/` URL to a YAML header, e.g. +::: code --- image: @root/images/photo.jpg --- -Quoting the URL solves the problem: +Wrapping the URL in double quotes solves the problem. - --- - image: "@root/images/photo.jpg" - --- - -### How do I deploy a site built with Ivy? +### How do I deploy a site built with Ark? One of the nicest things about a static website is that it's completely independent of the tool used to build it. You can host your website anywhere you like --- in the simplest case you can 'deploy' it simply by double-clicking on the `.html` files to view them locally in your browser. @@ -105,13 +102,6 @@ To make your website available on the public internet you have lots of options. -### Why is it called Ivy? - -I liked the name Industrial Vellum, IV. Also, the branching tree structure of the nodes reminded me of ivy. - - - - ### Can I disable a node? You can add a `disable` flag to a node's metadata header: @@ -120,7 +110,7 @@ You can add a `disable` flag to a node's metadata header: disable: true --- -This will stop Ivy from producing an output HTML page for the node. +This will stop Ark from producing an output HTML page for the node. Note that this only affects the node itself, not its children. @@ -128,10 +118,10 @@ Note that this only affects the node itself, not its children. ### Can I use a different Markdown library? -Sure. Ivy defaults to using the [Markdown][3] library to render `.md` files but you can [register a custom handler](@root/extensions//#rendering-engines) to use any library you like. +Sure. Ark defaults to using the [Markdown][3] library to render `.md` files but you can [register a custom handler](@root/extensions//#rendering-engines) to use any library you like. ### Can I use LaTeX markup? -Here's a [simple demo][4] of an Ivy site using the [KaTeX][5] JavaScript library to render LaTeX markup. +Here's a [simple demo][4] of an Ark site using the [KaTeX][5] JavaScript library to render LaTeX markup. diff --git a/docs/src/index.stx b/docs/src/index.stx index 089c1cc..e0c6220 100644 --- a/docs/src/index.stx +++ b/docs/src/index.stx @@ -1,8 +1,8 @@ --- title: Home -meta_title: Ivy — a static website generator in Python +meta_title: Ark — a static website generator in Python meta_description: > - Ivy is a static website generator built in Python. + Ark is a static website generator built in Python. It transforms a directory of text files into a self-contained website. --- @@ -12,13 +12,13 @@ meta_description: > [syntext]: https://github.com/dmulholl/syntext -Ivy is a static website generator built in Python. It's small, elegant, and simple to use. +Ark is a static website generator built in Python. It's small, elegant, and simple to use. - $ ivy --help + $ ark --help - Usage: ivy [command] + Usage: ark [command] - Ivy is a static website generator. It transforms a + Ark is a static website generator. It transforms a directory of text files into a self-contained website. Flags: @@ -37,33 +37,33 @@ Ivy is a static website generator built in Python. It's small, elegant, and simp Command Help: help Print the command's help text. -You can build many different kinds of website using Ivy but it's particularly suited to building project documentation like the documentation you're looking at right now. +You can build many different kinds of website using Ark but it's particularly suited to building project documentation like the documentation you're looking at right now. ### Formats -Ivy has builtin support for content written in [Markdown][], [Syntext][], or plain HTML, but Ivy itself is format-agnostic --- you can write your content in any format with a suitable Python library. +Ark has builtin support for content written in [Markdown][], [Syntext][], or plain HTML, but Ark itself is format-agnostic --- you can write your content in any format with a suitable Python library. -Similarly, Ivy has builtin support for [Jinja][] and [Ibis][] templates but can use any template language with a suitable Python library. +Similarly, Ark has builtin support for [Jinja][] and [Ibis][] templates but can use any template language with a suitable Python library. ### Installation -Install Ivy from the Python Package Index using `pip`: +Install Ark from the Python Package Index using `pip`: - $ pip install ivy + $ pip install ark -Ivy requires Python 3.10 or later. +Ark requires Python 3.10 or later. ### Links -* [Demo Site](http://www.dmulholl.com/demos/ivy/) -* [Package Index](https://pypi.python.org/pypi/ivy/) -* [Github](https://github.com/dmulholl/ivy) +* [Demo Site](http://www.dmulholl.com/demos/ark/) +* [Package Index](https://pypi.python.org/pypi/ark/) +* [Github](https://github.com/dmulholl/ark) diff --git a/docs/src/license.stx b/docs/src/license.stx index 9ff7724..457a204 100644 --- a/docs/src/license.stx +++ b/docs/src/license.stx @@ -1,11 +1,11 @@ --- title: License -meta_title: Ivy — License +meta_title: Ark — License --- -### Ivy +### Ark -All of Ivy's code has been placed in the public domain and is free for personal and commercial use. No attribution is required. +All of Ark's code has been placed in the public domain and is free for personal and commercial use. No attribution is required. This is free and unencumbered software released into the public domain. diff --git a/docs/src/options.stx b/docs/src/options.stx index 868cbc0..8d318fc 100644 --- a/docs/src/options.stx +++ b/docs/src/options.stx @@ -1,6 +1,6 @@ --- -title: Configuring Ivy -meta_title: Ivy — Configuration Options +title: Configuring Ark +meta_title: Ark — Configuration Options --- ::: insert toc @@ -8,11 +8,11 @@ meta_title: Ivy — Configuration Options ### Site Configuration File -By default, Ivy searches for a site configuration file called either `site.py` or `config.py`. -You can specify a custom filename for the site configuration file using the `IVY_CONFIG_FILE` environment variable, e.g. +By default, Ark searches for a site configuration file called either `site.py` or `config.py`. +You can specify a custom filename for the site configuration file using the `ARK_CONFIG_FILE` environment variable, e.g. ::: code bash - IVY_CONFIG_FILE="site_config.py" + ARK_CONFIG_FILE="site_config.py" This variable takes a colon-separated list of filenames. @@ -20,17 +20,17 @@ This variable takes a colon-separated list of filenames. ### Directory Names -By default, Ivy uses directories named `ext`, `inc`, `lib`, `out`, `res`, and `src`. +By default, Ark uses directories named `ext`, `inc`, `lib`, `out`, `res`, and `src`. You can customize these default directory names using environment variables, e.g. ::: code bash - IVY_EXT_DIR="plugins" - IVY_INC_DIR="includes" - IVY_LIB_DIR="themes" - IVY_OUT_DIR="output" - IVY_RES_DIR="resources" - IVY_SRC_DIR="source" + ARK_EXT_DIR="plugins" + ARK_INC_DIR="includes" + ARK_LIB_DIR="themes" + ARK_OUT_DIR="output" + ARK_RES_DIR="resources" + ARK_SRC_DIR="source" Alternatively, you can customize directory names on a per-site basis by specifying alternate names in your site configuration file, e.g. @@ -46,7 +46,7 @@ Alternatively, you can customize directory names on a per-site basis by specifyi ### Custom File Extensions -Ivy generates output pages with a `.html` file extension by default. +Ark generates output pages with a `.html` file extension by default. You can specify a custom file extension for output files in your site configuration file, e.g. @@ -66,7 +66,7 @@ You can generate directory-style URLs --- i.e. URLs ending in a forward slash -- ### Absolute URLs -Ivy generates page-relative URLs by default. +Ark generates page-relative URLs by default. You can generate absolute URLs by specifying an explicit root URL in your site configuration file, e.g. @@ -77,7 +77,7 @@ You can generate absolute URLs by specifying an explicit root URL in your site c ### Site-Relative URLs -Ivy generates page-relative URLs by default. +Ark generates page-relative URLs by default. You can generate site-relative URLs --- i.e. URLs that begin with a `/` --- by specifying a root URL of `"/"` in your site configuration file: diff --git a/docs/src/quickstart.stx b/docs/src/quickstart.stx index 140ba76..b0c85e2 100644 --- a/docs/src/quickstart.stx +++ b/docs/src/quickstart.stx @@ -1,22 +1,22 @@ --- title: Quickstart Tutorial -meta_title: Ivy — Quickstart Tutorial +meta_title: Ark — Quickstart Tutorial --- -Install Ivy from the Python Package Index using `pip`: +Install Ark from the Python Package Index using `pip`: - $ pip install ivy + $ pip install ark -Once Ivy is installed, create a new directory for your site and `cd` into it: +Once Ark is installed, create a new directory for your site and `cd` into it: $ mkdir mysite $ cd mysite Initialize the site directory using the `init` command: - $ ivy init + $ ark init -Ivy will create the following directory structure for your site: +Ark will create the following directory structure for your site: mysite/ |-- inc/ # includes directory for menus, etc. @@ -24,24 +24,24 @@ Ivy will create the following directory structure for your site: |-- src/ # source directory for text files |-- site.py # site configuration file -Ivy initializes your `src` directory with a simple skeleton site which you can build immediately using the `build` command: +Ark initializes your `src` directory with a simple skeleton site which you can build immediately using the `build` command: - $ ivy build + $ ark build -You can run the `build` command from the site directory itself or from any of its subdirectories. It tells Ivy to render the text files in the `src` directory into HTML and place the output in an `out` directory. +You can run the `build` command from the site directory itself or from any of its subdirectories. It tells Ark to render the text files in the `src` directory into HTML and place the output in an `out` directory. -Run the `build` command and take a look at the output. You can open the HTML files directly in your browser or use Ivy's builtin test server to serve the contents of the `out` directory: +Run the `build` command and take a look at the output. You can open the HTML files directly in your browser or use Ark's builtin test server to serve the contents of the `out` directory: - $ ivy serve + $ ark serve This command will start the test server and automatically launch the default web browser to view the site. Hit Ctrl-C when you want to shut the server down. -Ivy will build the site using its default `graphite` theme, which you can find in the `lib` folder. Try rebuilding the site using the `debug` theme which is less pretty but provides a lot of useful information that can help you when building or customizing your own themes: +Ark will build the site using its default `graphite` theme, which you can find in the `lib` folder. Try rebuilding the site using the `debug` theme which is less pretty but provides a lot of useful information that can help you when building or customizing your own themes: - $ ivy build --theme debug + $ ark build --theme debug -You can run `ivy --help` to see a list of all the available commands. Note that you can get help for a specific command by running +You can run `ark --help` to see a list of all the available commands. Note that you can get help for a specific command by running - $ ivy help + $ ark help replacing `` with the command name. diff --git a/docs/src/resources.stx b/docs/src/resources.stx index 888571e..ba985f4 100644 --- a/docs/src/resources.stx +++ b/docs/src/resources.stx @@ -1,6 +1,6 @@ --- title: Resources -meta_title: Ivy — Resources +meta_title: Ark — Resources classes: extra-deflist-vspace --- @@ -15,7 +15,7 @@ classes: extra-deflist-vspace [[ Holly ]] - This blog-engine plugin turns Ivy into a WordPress-style blog generator with support for post and tag indexes. + This blog-engine plugin turns Ark into a WordPress-style blog generator with support for post and tag indexes. :p .small @@ -23,7 +23,7 @@ classes: extra-deflist-vspace [[ Outline ]] - A clean, responsive, text-focused theme for Ivy. + A clean, responsive, text-focused theme for Ark. This is the theme I use for my own personal website. :p .small @@ -32,8 +32,8 @@ classes: extra-deflist-vspace [[ Vanilla ]] - A simple, single-column theme for Ivy. - This was the original theme for Ivy's documentation. + A simple, single-column theme for Ark. + This was the original theme for Ark's documentation. :p .small @@ -41,7 +41,7 @@ classes: extra-deflist-vspace [[ Twenty Fifteen ]] - A blog-style theme for Ivy based on the classic WordPress theme of the same name. + A blog-style theme for Ark based on the classic WordPress theme of the same name. :p .small diff --git a/docs/src/shortcodes.stx b/docs/src/shortcodes.stx index 406cbdb..fcdbdf3 100644 --- a/docs/src/shortcodes.stx +++ b/docs/src/shortcodes.stx @@ -1,12 +1,12 @@ --- title: Shortcodes -meta_title: Ivy — Shortcodes +meta_title: Ark — Shortcodes --- [github]: https://github.com/dmulholl/shortcodes [docs]: http://www.dmulholl.com/dev/shortcodes.html -Ivy has builtin support for WordPress-style [shortcodes][docs] in node content. These shortcodes can have space-separated positional and keyword arguments: +Ark has builtin support for WordPress-style [shortcodes][docs] in node content. These shortcodes can have space-separated positional and keyword arguments: \[% tag arg1 key=arg2 %] @@ -17,7 +17,7 @@ Shortcodes are powerful --- you can use them to inject content into a node's tex ### Registering Shortcodes Shortcodes are implemented by the [shortcodes][github] package, an external library. -An Ivy extension can register a new shortcode tag using the shortcode package's `@register()` decorator: +An Ark extension can register a new shortcode tag using the shortcode package's `@register()` decorator: ::: code python import shortcodes @@ -54,12 +54,12 @@ shortcode parser. Here's a sample shortcode you could use to inject the raw content of a file from the site's includes directory, `inc`, directly into a node file: ::: code python - import ivy + import ark import shortcodes @shortcodes.register('include_raw') def handler(pargs, kwargs, node): - path = ivy.site.inc(pargs[0]) + path = ark.site.inc(pargs[0]) with open(path) as file: return file.read() @@ -73,15 +73,15 @@ The shortcode will be replaced by the content of the file. ### Example --- `include_rendered` -Ivy already loads and renders the content of files from the includes directory to make it available in template files. What if you want to include this pre-rendered content in a node file? +Ark already loads and renders the content of files from the includes directory to make it available in template files. What if you want to include this pre-rendered content in a node file? ::: code python - import ivy + import ark import shortcodes @shortcodes.register('include_rendered') def handler(pargs, kwargs, node): - includes = ivy.site.includes() + includes = ark.site.includes() return includes[pargs[0]] To use this shortcode, just supply the name of the file you want to include, leaving off the file extension, e.g. @@ -97,13 +97,13 @@ The shortcode will be replaced by the rendered content of the file. This is a handy shortcode for building sitemaps --- it assembles a list of links to all the children of a target node: ::: code python - import ivy + import ark import shortcodes @shortcodes.register('list_children') def handler(pargs, kwargs, node): links = [] - target_node = ivy.nodes.node(pargs[0]) + target_node = ark.nodes.node(pargs[0]) for child in target_node.children: title = child.get('title') or 'Missing Title' links.append(f'* [{title}]({child.url})') @@ -122,7 +122,7 @@ The shortcode will be replaced by the list of links. Here's an example of a block-level shortcode wrapping a block of content. Imagine we want to add special styling to quotes with the name of the quote's author attached: ::: code python - import ivy + import ark import shortcodes @shortcodes.register('quote', 'endquote') diff --git a/docs/src/sites.stx b/docs/src/sites.stx index 7d497ea..e7bc3e2 100644 --- a/docs/src/sites.stx +++ b/docs/src/sites.stx @@ -1,6 +1,6 @@ --- title: Building Websites -meta_title: Ivy — Building Websites +meta_title: Ark — Building Websites --- ::: insert toc @@ -15,19 +15,19 @@ meta_title: Ivy — Building Websites To initialize a new site, create a site directory, `cd` into it, and run the `init` command: - $ ivy init + $ ark init To build an existing site, run the `build` command from the site directory or any of its subdirectories: - $ ivy build + $ ark build -Use the `ivy --help` flag to view the full command-line help text. +Use the `ark --help` flag to view the full command-line help text. ### Site Structure -Ivy assumes that a site uses the following default directory structure: +Ark assumes that a site uses the following default directory structure: site/ |-- ext/ # extensions directory for plugins @@ -38,7 +38,7 @@ Ivy assumes that a site uses the following default directory structure: |-- src/ # source directory for text files |-- site.py # site configuration file -Ivy uses the presence of a `site.py` file (alternatively, a `config.py` file) to identify a site's home directory. +Ark uses the presence of a `site.py` file (alternatively, a `config.py` file) to identify a site's home directory. Static assets such as image files should be placed in the site's resources directory, `res`. The content of this directory is copied to the output directory when the site is built. @@ -46,7 +46,7 @@ Static assets such as image files should be placed in the site's resources direc ### Nodes -A node is a text file or directory stored in a site's `src` directory. Ivy parses the `src` directory into a tree of nodes which it then renders into a website, generating a single HTML page in the `out` directory for each node in the tree. +A node is a text file or directory stored in a site's `src` directory. Ark parses the `src` directory into a tree of nodes which it then renders into a website, generating a single HTML page in the `out` directory for each node in the tree. A node file can begin with a [YAML][] header specifying metadata for the node: @@ -79,7 +79,7 @@ correspond to a single node in the parse tree. Node files provide content and me ### Metadata -Ivy has builtin support for node metadata in [YAML][] format. Note that metadata keys are converted to lowercase and spaces and hyphens are replaced by underscores so the YAML attribute: +Ark has builtin support for node metadata in [YAML][] format. Note that metadata keys are converted to lowercase and spaces and hyphens are replaced by underscores so the YAML attribute: --- Meta Title: Important Document @@ -105,15 +105,15 @@ All nodes have the following default attributes: ### Links -Ivy generates page-relative URLs and files with a `.html` extension by default. +Ark generates page-relative URLs and files with a `.html` extension by default. To link to files within your site from nodes or templates use site-relative URLs prefixed by `@root/`, e.g. @root/images/photo.jpg -Ivy will automatically rewrite these URLs in the appropriate format. +Ark will automatically rewrite these URLs in the appropriate format. -Use two trailing slashes when linking to pages generated by Ivy itself --- this tells Ivy to rewrite the ending to suit your extension settings. +Use two trailing slashes when linking to pages generated by Ark itself --- this tells Ark to rewrite the ending to suit your extension settings. @root/posts/my-post// @@ -131,13 +131,13 @@ This default slug can be overridden by setting a custom slug in the header: slug: my-custom-slug --- -Slugs can be customized sitewide by registering a filter callback on the `Filter.SLUGIFY` [filter hook](@root/extensions//#event-filter-hooks). (You can find this hook in the `ivy/utils.py` file.) +Slugs can be customized sitewide by registering a filter callback on the `Filter.SLUGIFY` [filter hook](@root/extensions//#event-filter-hooks). (You can find this hook in the `ark/utils.py` file.) ### Classes -Ivy automatically generates a list of useful CSS classes for each page's `` element based on the page's URL slugs. For example the page with the URL: +Ark automatically generates a list of useful CSS classes for each page's `` element based on the page's URL slugs. For example the page with the URL: @root/foo/bar/baz// @@ -189,5 +189,5 @@ Just add `meta_title` and/or `meta_description` attributes to the page's header: meta_description: A description of the page's content. --- -This isn't really a feature of Ivy itself --- the default theme simply checks for these attributes in its template files and you can add similar support to your own custom themes. +This isn't really a feature of Ark itself --- the default theme simply checks for these attributes in its template files and you can add similar support to your own custom themes. diff --git a/docs/src/themes.stx b/docs/src/themes.stx index 764563f..ff8a029 100644 --- a/docs/src/themes.stx +++ b/docs/src/themes.stx @@ -1,6 +1,6 @@ --- title: Themes -meta_title: Ivy — Themes +meta_title: Ark — Themes --- [jinja]: http://jinja.pocoo.org @@ -8,7 +8,7 @@ meta_title: Ivy — Themes [wordpress]: http://www.wordpress.org/ -Ivy borrows its idea of themes from [WordPress][] where a theme is a directory of templates, styles, and scripts that together provide the look and feel for a site. +Ark borrows its idea of themes from [WordPress][] where a theme is a directory of templates, styles, and scripts that together provide the look and feel for a site. :p .center *A site's theme is completely independent of its content.* @@ -24,13 +24,13 @@ Themes should be placed in the site's `lib` directory, and the name of the activ ::: code python theme = "graphite" -Ivy ships with a small collection of bundled themes including `graphite`, the default theme you're looking at right now, and `debug`, a diagnostic theme useful when designing themes or debugging sites. +Ark ships with a small collection of bundled themes including `graphite`, the default theme you're looking at right now, and `debug`, a diagnostic theme useful when designing themes or debugging sites. Note that you can override the currently active theme with the `build` command's `--theme` flag: - $ ivy build --theme debug + $ ark build --theme debug -Ivy searches for a named theme first in the site's theme library, then (if it exists) in the global theme library specified by the `$IVY_THEMES` environment variable. Finally it searches among the default themes bundled with Ivy itself. +Ark searches for a named theme first in the site's theme library, then (if it exists) in the global theme library specified by the `$ARK_THEMES` environment variable. Finally it searches among the default themes bundled with Ark itself. @@ -38,7 +38,7 @@ Ivy searches for a named theme first in the site's theme library, then (if it ex A theme is simply a directory; the theme's name is the name of the directory. -When building a website, Ivy looks for three subdirectories within the theme directory: `resources`, `templates`, and `extensions`. +When building a website, Ark looks for three subdirectories within the theme directory: `resources`, `templates`, and `extensions`. [[ `resources` ]] @@ -47,15 +47,15 @@ When building a website, Ivy looks for three subdirectories within the theme dir [[ `templates` ]] - The `templates` directory is where Ivy looks for the theme's template files. + The `templates` directory is where Ark looks for the theme's template files. This directory is also where Jinja and Ibis will look for files included in templates using `{% include %}` tags. [[ `extensions` ]] - Themes can bundle extensions for Ivy by placing Python modules or packages in the `extensions` directory. - These will be loaded automatically by Ivy. + Themes can bundle extensions for Ark by placing Python modules or packages in the `extensions` directory. + These will be loaded automatically by Ark. -A theme directory can contain other files and directories --- e.g. a license file, readme file, etc. --- which Ivy will simply ignore. +A theme directory can contain other files and directories --- e.g. a license file, readme file, etc. --- which Ark will simply ignore. @@ -63,7 +63,7 @@ A theme directory can contain other files and directories --- e.g. a license fil Template files provide the HTML scaffolding for constructing pages --- you can think of a template file as the mould into which your content will be poured. -There are countless templating languages and Ivy can use any of them, but it has builtin support for [Jinja][] and [Ibis][]. Ivy determines the language of a template file by looking at its extension --- `.jinja` for Jinja and `.ibis` for Ibis. +There are countless templating languages and Ark can use any of them, but it has builtin support for [Jinja][] and [Ibis][]. Ark determines the language of a template file by looking at its extension --- `.jinja` for Jinja and `.ibis` for Ibis. You can add support for alternative templating languages via [plugins](@root/extensions//#template-engines). @@ -71,7 +71,7 @@ You can add support for alternative templating languages via [plugins](@root/ext ### Template Hierarchy -When Ivy generates a HTML page for a node it searches for the appropriate template file to use in reverse order of specificity (most specific first, least specific last). +When Ark generates a HTML page for a node it searches for the appropriate template file to use in reverse order of specificity (most specific first, least specific last). For example, the node file: @@ -81,14 +81,14 @@ corresponds to the node: -Ivy will search for a template file for this node in the following order: +Ark will search for a template file for this node in the following order: 1. node-foo-bar-baz.* 2. node-foo-bar.* 3. node-foo.* 4. node.* -Ultimately, Ivy will always check for a template file called `node.*` --- this is the default template name and the only template file actually required by a theme. +Ultimately, Ark will always check for a template file called `node.*` --- this is the default template name and the only template file actually required by a theme. A node can override this process by specifying a custom template name in its header: diff --git a/ivy/bundle/lib/debug/readme.md b/ivy/bundle/lib/debug/readme.md deleted file mode 100644 index 602496a..0000000 --- a/ivy/bundle/lib/debug/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# Ivy Debug Theme - -[1]: https://github.com/dmulholl/ivy - -This [Ivy][1] theme is designed as a debugging tool, useful when building themes or plugins. -It displays all the page data available for use in template files. diff --git a/ivy/extensions/ivy_syntext.py b/ivy/extensions/ivy_syntext.py deleted file mode 100644 index e0db5bc..0000000 --- a/ivy/extensions/ivy_syntext.py +++ /dev/null @@ -1,17 +0,0 @@ -## -## Add support for Syntext files with a `.stx` extension. -## - -import ivy - -try: - import syntext -except ImportError: - syntext = None - -settings = ivy.site.config.get('syntext_settings') or {'pygmentize': True} - -if syntext: - @ivy.renderers.register('stx') - def render_syntext(text): - return syntext.render(text, **settings) diff --git a/readme.md b/readme.md index 64bc294..acd3a3e 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ -# Ivy +# Ark -Ivy is a static website generator built in Python. It's small, elegant, and simple to use. +Ark is a static website generator built in Python. It's small, elegant, and simple to use. -* [Documentation](http://www.dmulholl.com/docs/ivy/main/) -* [Demo Site](http://www.dmulholl.com/demos/ivy/) +* [Documentation](http://www.dmulholl.com/docs/ark/main/) +* [Demo Site](http://www.dmulholl.com/demos/ark/) diff --git a/setup.py b/setup.py index 619ec0b..0cd725a 100755 --- a/setup.py +++ b/setup.py @@ -2,9 +2,9 @@ """ A static website generator for people who enjoy the simpler things in life. -* `Github `_ -* `Documentation `_ -* `Demo `_ +* `Github `_ +* `Documentation `_ +* `Demo `_ """ @@ -17,8 +17,8 @@ # MANIFEST.in file content. manifest = """\ include license.txt readme.md -recursive-include ivy/extensions * -recursive-include ivy/bundle * +recursive-include ark/extensions * +recursive-include ark/bundle * """ @@ -29,7 +29,7 @@ # Load the package's metadata into the meta dict. -metapath = os.path.join(os.path.dirname(__file__), 'ivy', '__init__.py') +metapath = os.path.join(os.path.dirname(__file__), 'ark', '__init__.py') with io.open(metapath, encoding='utf-8') as metafile: regex = r'''^__([a-z]+)__ = ["'](.*)["']''' meta = dict(re.findall(regex, metafile.read(), flags=re.MULTILINE)) @@ -37,13 +37,13 @@ # Standard setup routine. setuptools.setup( - name = 'ivy', + name = 'ark', version = meta['version'], packages = setuptools.find_packages(), include_package_data = True, entry_points = { 'console_scripts': [ - 'ivy = ivy:main', + 'ark = ark:main', ], }, install_requires = [ @@ -59,7 +59,7 @@ ], python_requires = ">=3.8", author = 'Darren Mulholland', - url='https://github.com/dmulholl/ivy', + url='https://github.com/dmulholl/ark', license = 'Public Domain', description = 'A static website generator for people who enjoy the simpler things in life.', long_description = __doc__,