Commit Graph

73 Commits

Author SHA1 Message Date
Brian S. Stephan d4ce04cd34
update feed test directory for the new structure
I guess this proves that the old structure still works with the new
code, though it creates IDs that have the file path in them

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-30 22:35:58 -06:00
Brian S. Stephan 30d6f99c9b
return the proper atom and rss content types for the feeds
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-30 15:31:18 -06:00
Brian S. Stephan 575e2ad387
provide author information for the feed and entries
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-30 15:25:46 -06:00
Brian S. Stephan b26975421c
make the feed ID be a valid URL for compliance
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-30 15:19:57 -06:00
Brian S. Stephan 6dc443e59f
implement a rudimentary Atom/RSS feed module
this provides a somewhat unconfigurable (at the moment) feed module
which provides Atom and RSS feeds. entries are determined by symlinks to
content pages, because my core CMS usage is still more general and not
blog-like. the symlinks allow for arbitrarily adding entries as I see
fit.

this also moves core Markdown parser stuff to the library module, since
that's used by the feed as well as normal pages

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-30 14:55:02 -06:00
Brian S. Stephan 7b225a6de3
adding a compliant copyright line to all code
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-28 15:33:41 -06:00
Brian S. Stephan e1dc2afc7b
add SPDX-License-Identifier and DCO information
this includes my personal signoff on the MAINTAINERS.md for DCO purposes

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-18 11:15:56 -06:00
Brian S. Stephan 0fef13c71a
version bumps, especially flask and werkzeug 3 2023-10-07 14:02:23 -05:00
Brian S. Stephan 715bc38d78
serve per-instance static files at custom-static/ 2022-12-31 10:51:36 -06:00
Brian S. Stephan e9af2de21e
don't assume all styles are in the static directory
this is to make room for a second, instance-configured spot for them
2022-12-31 10:16:35 -06:00
Brian S. Stephan 4a2f650a33
don't hardcode styles to present, use config
now that we can override the styles in practice, we also need to only
present what is possible in the HTML
2022-12-31 09:53:22 -06:00
Brian S. Stephan fd0fb390ff
allow for overriding PAGE_STYLES
moving this allows for per-instance customizations later, but that won't
be practical until serving styles from the instance dir is also allowed.
but, this sets the ground work and does allow for removing some styles
(e.g. if someone wanted to only allow 'plain').

also I still need to add the ability to present the themes list dynamically
2022-12-31 09:40:13 -06:00
Brian S. Stephan be8a8dd35a
test full path for stylesheets
I'm going to be screwing around with this code in some future commits so
it's better to be explicit
2022-12-31 09:02:57 -06:00
Brian S. Stephan 0f03ad6f38
allow pages to supply extra footer text 2022-09-16 13:35:40 -05:00
Brian S. Stephan 985bb93839
do a requirements bump
notable changes:

* Flask 1.1 treats redirects to itself as relative URLs now, so a spate
  of tests were updated
2022-04-19 08:41:59 -05:00
Brian S. Stephan 502adac89c
make the pydot syntax backwards compatible with code fences
without this, the code fence parser was getting thrown off if you didn't
have the pydot extension loaded, which was thwarting backwards
compatibility. this makes the pydot bits look like an attribute to the
vanilla parser, so at least then the vanilla markdown renders as
intended
2022-04-19 08:41:59 -05:00
Brian S. Stephan 08305e26db
pydot: handle multiple dot images in one file 2022-04-19 08:41:59 -05:00
Brian S. Stephan f15d955067
initial crack at a block-level figure parser
I didn't like the other figure + figcaption parsers, they either assumed
a lot about usage (e.g. images only), or they were inline parsers that
either wrapped the figure in a paragraph tag (which is incorrect syntax)
or did span trickery (annoying)

so, this handles images and maybe other things, and does things properly
with figures as their own blocks. incomplete but it works with my
images, and should allow for looping (for multi-line content) in the
future?
2022-04-19 08:41:55 -05:00
Brian S. Stephan b3c3c0de45
clean up the default markdown configuration a bit
this brings the config a bit closer to my default, and updates the
expectations of a test accordingly
2022-04-19 06:45:32 -05:00
Brian S. Stephan 8a62167cea remove some self-specific stuff from settings
implements most, if not all, of #15
2021-11-01 23:27:00 -05:00
Brian S. Stephan e61c55bed2 handle graphviz parsing errors more cleanly 2021-06-24 11:37:57 -05:00
Brian S. Stephan da055acda6 provide markdown extension to render graphviz
this is server side, and a more standard format, and thus I like it more
than mermaid, which I've been using at work. but, I really wanted a
server-side option (see my manifesto) for drawing relationship graphs,
for D&D stuff of all things.

this adds an optional 'graphviz' feature to package installation which
consequently depends on pydot
2021-06-24 09:46:26 -05:00
Brian S. Stephan 1583e3be99 more debugging and catch md misconfigured error 2021-06-24 09:43:00 -05:00
Brian S. Stephan 954f7f4e80 allow markdown files to specify a redirect
closes #13
2021-06-06 22:24:35 -05:00
Brian S. Stephan afbfab338f properly apply site wrap classes to style wide version
fixes #12
2021-06-03 07:52:01 -05:00
Brian S. Stephan e8377adcf5 allow pages to specify different templates 2021-04-30 19:41:39 -05:00
Brian S. Stephan cde82ab918 don't route /media separately anymore 2021-04-17 11:16:34 -05:00
Brian S. Stephan 1ac13f3b9c add some 500 tests for test coverage 2021-04-17 11:08:01 -05:00
Brian S. Stephan 30b79e9dc1 add tests for subdir symlinks
this is automagically supported by the previous rewrite
2021-04-17 10:39:05 -05:00
Brian S. Stephan 60715a3a5c make request -> instance conversion support symlink dirs
I think this also clarifies the code, a bit
2021-04-17 10:31:05 -05:00
Brian S. Stephan c90f0a3a42 treat symlinks as redirects
closes #7
2021-04-15 21:44:02 -05:00
Brian S. Stephan 71ead20f3f have file handler return render type rather than bool
for when we have further types to render
2021-04-15 20:36:30 -05:00
Brian S. Stephan be88c3c1bc don't error on breadcrumbs if a dir doesn't have index.md
fixes #8
2021-04-14 21:35:14 -05:00
Brian S. Stephan ced67bec8b allow for serving files directly inside pages/ 2021-04-14 20:45:50 -05:00
Brian S. Stephan d89fd151ca use just the page part of the path in breadcrumbs
rather than showing the full path (e.g. /foo/bar/baz) in breadcrumbs
when the page doesn't have a Title, show just the leaf (baz)

Closes #4
2021-02-27 00:30:32 -06:00
Brian S. Stephan ce1ed60dd2 allow for configuration to override the favicon
Closes #5
2021-02-27 00:10:03 -06:00
Brian S. Stephan 70a8d4f06a add configurable contact email for error pages 2021-02-23 13:11:52 -06:00
Brian S. Stephan 39d78af524 add error handler pages for 400, 404, 500 2021-02-21 19:35:52 -06:00
Brian S. Stephan f08c1117d8 move site suffix into title always
this tweaks the behavior of the title to always append ' - suffix' to
any title (from the meta tag, or generated via request path), unless the
page explicitly specifies an empty Title meta tag
2021-02-20 23:21:29 -06:00
Brian S. Stephan dd7687884a remove resolve_page_file, been refactored away 2021-02-20 22:50:56 -06:00
Brian S. Stephan 15c88d920b use request path as an alternative to Title metadata 2021-02-20 22:43:42 -06:00
Brian S. Stephan 1cef3b8196 rewrite generate_parent_navs to work on resource paths
the old code was kind of impossible to understand by reading it, so this
is hopefully considerably clearer
2021-02-20 21:47:39 -06:00
Brian S. Stephan faf4a7f166 minor style cleanup 2021-02-20 19:22:23 -06:00
Brian S. Stephan 4dcc1c91c2 add method to from resource path to request path 2021-02-20 19:19:36 -06:00
Brian S. Stephan 1c40f45ffd clarify name of request_path_to_instance_resource_path 2021-02-20 17:53:32 -06:00
Brian S. Stephan 6026c51490 add some functional tests for our sanity checks 2021-02-20 17:47:36 -06:00
Brian S. Stephan 2e0e87fe95 begin rewriting path to resource resolver
this code was getting too messy and scattered, and I realized that Flask
wasn't doing as much as I thought it was here, so now we need more
safety and sanity checks
2021-02-20 17:42:58 -06:00
Brian S. Stephan e6d2015de5 use smarty markdown extension for dashes, ellipses 2021-02-11 19:05:01 -06:00
Brian S. Stephan 8a6f4d6b45 test multi-line metadata entries 2021-01-17 23:58:57 -06:00
Brian S. Stephan c25fefa9e3 add opengraph metadata to pages, via Markdown meta 2021-01-17 23:02:14 -06:00