From bf0b7a1cb754695264101ae9ccfafbe88bdede81 Mon Sep 17 00:00:00 2001 From: Cas Rusnov Date: Mon, 3 Jun 2019 19:23:34 -0700 Subject: [PATCH 1/5] Comment out smart CSS from default mapping. Fix minor bug in template_tools --- pixywerk2/defaults/chains.yaml | 34 +++++++++++++++++----------------- pixywerk2/template_tools.py | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pixywerk2/defaults/chains.yaml b/pixywerk2/defaults/chains.yaml index 4683860..18bb72e 100644 --- a/pixywerk2/defaults/chains.yaml +++ b/pixywerk2/defaults/chains.yaml @@ -62,24 +62,24 @@ template-html: - jinja2 - jinja2_page_embed -# Smart CSS are simply converted to CSS. -sass: - extension: - - sass - - scss - chain: - - process_sass -less: - extension: - - less - chain: - - process_less +# # Smart CSS are simply converted to CSS. +# sass: +# extension: +# - sass +# - scss +# chain: +# - process_sass +# less: +# extension: +# - less +# chain: +# - process_less -stylus: - extension: - - styl - chain: - - process_styl +# stylus: +# extension: +# - styl +# chain: +# - process_styl # # Images are processed into thumbnails and sized in addition to being retained as their original # FIXME implement split chain processor, implement processor arguments, diff --git a/pixywerk2/template_tools.py b/pixywerk2/template_tools.py index 28e4249..058fb76 100644 --- a/pixywerk2/template_tools.py +++ b/pixywerk2/template_tools.py @@ -67,7 +67,7 @@ def file_content(root: str, metatree: MetaTree, processor_chains: ProcessorChain metadata = metatree.get_metadata(file_name) chain = processor_chains.get_chain_for_filename(os.path.join(root, file_name), ctx=metadata) contcache[file_name] = chain.output - return unicode(chain.output) + return str(chain.output) return get_file_content From b8bc24cf6f58ec1b33f78e5a69da0d3f74a55a41 Mon Sep 17 00:00:00 2001 From: Cassowary Rusnov Date: Wed, 28 Apr 2021 23:09:35 -0700 Subject: [PATCH 2/5] Reformatted with automated tools and minor fixes. --- TODO.md | 1 + {READMES => docs}/METADATA.md | 0 {READMES => docs}/Patterns.md | 0 {READMES => docs}/TemplateFunctions.md | 0 {READMES => docs}/project-layout.md | 0 examples/pixywerk.com/publish/atom.xml | 2 +- examples/pixywerk.com/publish/css/main.css | 5 + .../publish/posts/post-2019-04-15.html | 2 +- .../posts/post-2019-05-16.another-post.html | 2 +- .../publish/posts/post-2019-05-19.html | 8 +- examples/pixywerk.com/publish/recurse.html | 134 ++++++++++++++++++ .../publish/templates/post.jinja2 | 2 +- examples/pixywerk.com/src/recurse.thtml | 5 + pixywerk2/__main__.py | 11 +- pixywerk2/metadata.py | 3 +- pixywerk2/processchain.py | 3 +- pixywerk2/processors/jinja2.py | 4 +- pixywerk2/processors/jinja2_page_embed.py | 5 +- pixywerk2/processors/passthrough.py | 4 +- pixywerk2/processors/process_md.py | 3 +- pixywerk2/processors/processors.py | 3 +- pixywerk2/pygments.py | 16 +-- pixywerk2/template_tools.py | 34 ++++- pixywerk2/utils.py | 1 - 24 files changed, 209 insertions(+), 39 deletions(-) rename {READMES => docs}/METADATA.md (100%) rename {READMES => docs}/Patterns.md (100%) rename {READMES => docs}/TemplateFunctions.md (100%) rename {READMES => docs}/project-layout.md (100%) create mode 100644 examples/pixywerk.com/publish/recurse.html create mode 100644 examples/pixywerk.com/src/recurse.thtml diff --git a/TODO.md b/TODO.md index af6c80b..a0d5482 100644 --- a/TODO.md +++ b/TODO.md @@ -4,3 +4,4 @@ * Project global defines, parameters. * pre- and post-scripts that will be run from __main__, either some shipped with pixywerk or project-level. * Library of template modules? ATOM et al. +* Some off the shelf website templates and a template manager. diff --git a/READMES/METADATA.md b/docs/METADATA.md similarity index 100% rename from READMES/METADATA.md rename to docs/METADATA.md diff --git a/READMES/Patterns.md b/docs/Patterns.md similarity index 100% rename from READMES/Patterns.md rename to docs/Patterns.md diff --git a/READMES/TemplateFunctions.md b/docs/TemplateFunctions.md similarity index 100% rename from READMES/TemplateFunctions.md rename to docs/TemplateFunctions.md diff --git a/READMES/project-layout.md b/docs/project-layout.md similarity index 100% rename from READMES/project-layout.md rename to docs/project-layout.md diff --git a/examples/pixywerk.com/publish/atom.xml b/examples/pixywerk.com/publish/atom.xml index ccb139c..c9170f9 100644 --- a/examples/pixywerk.com/publish/atom.xml +++ b/examples/pixywerk.com/publish/atom.xml @@ -7,7 +7,7 @@ urn:uuid:2cbb1961-b1ca-3b73-a6ce-d2e2feae9ab4 - 2019-05-20T06:32:27.357672+00:00 + 2021-02-05T04:45:24.766181+00:00 diff --git a/examples/pixywerk.com/publish/css/main.css b/examples/pixywerk.com/publish/css/main.css index 05b7f22..64a56d0 100644 --- a/examples/pixywerk.com/publish/css/main.css +++ b/examples/pixywerk.com/publish/css/main.css @@ -267,6 +267,11 @@ footer { font-variant: small-caps; } +pre { line-height: 125%; margin: 0; } +td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } +span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } +td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } .hll { background-color: #ffffcc } .c { color: #008800; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ diff --git a/examples/pixywerk.com/publish/posts/post-2019-04-15.html b/examples/pixywerk.com/publish/posts/post-2019-04-15.html index b4349d8..c70b00d 100644 --- a/examples/pixywerk.com/publish/posts/post-2019-04-15.html +++ b/examples/pixywerk.com/publish/posts/post-2019-04-15.html @@ -16,7 +16,7 @@

My first post

-