Commit Graph

81 Commits

Author SHA1 Message Date
27d4d16572
go back to using the "or any later version" clause of GPLv3
I think arguments that "Such new versions will be similar in spirit to
the present version", in my own reading and readings such as in
https://www.draketo.de/software/gpl-or-later, convince me for now that
it is acceptable to allow the "or later" for compatibility and future
problem's sake

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-21 08:22:49 -05:00
359916e7d9
do some trivial cleanups in README
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-18 21:20:12 -05:00
d49b9d48a8
don't add an artificial ./ subdir due to how os.path.relpath works
this fixes stuff like og:urls of https://foo/./ or https://foo/./page
and also removes an extra layer of depth in the breadcrumb hierarchy,
just by suppressing the '.' in relpath output at the root of pages/

fixes #21

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-18 21:09:50 -05:00
8aabd93273
don't copy .files into the SSG output dir
they may be vim swap files and that kind of garbage

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-18 08:20:58 -05:00
6d7987cfae
don't require the host to be in the Image tag
now that we know our base host via config, we can stop hardcoding it in
each Image tag

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-18 08:13:18 -05:00
4644aea4b0
bump the copyright on some new/rewritten modules
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-17 08:06:06 -05:00
f3eed9d4f2
fix and test the linking to the style switcher
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-17 00:47:00 -05:00
7eb485c6ae
rewrite the project as a static site generator
this removes Flask, reworks a number of library methods accordingly, and
adds generators and build commands to process the instance directory
(largely unchanged, except config.py is now config.json) and spit out
files suitable to be served by a web server such as Nginx.

there are probably some rough edges here, but overall this works.

also note, as this is no longer server software on a network, the
license has changed from AGPLv3 to GPLv3, and the "or any later version"
allowance has been removed

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-03-16 23:56:37 -05:00
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
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
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
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
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
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
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
0fef13c71a
version bumps, especially flask and werkzeug 3 2023-10-07 14:02:23 -05:00
715bc38d78
serve per-instance static files at custom-static/ 2022-12-31 10:51:36 -06:00
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
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
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
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
0f03ad6f38
allow pages to supply extra footer text 2022-09-16 13:35:40 -05:00
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
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
08305e26db
pydot: handle multiple dot images in one file 2022-04-19 08:41:59 -05:00
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
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
8a62167cea remove some self-specific stuff from settings
implements most, if not all, of #15
2021-11-01 23:27:00 -05:00
e61c55bed2 handle graphviz parsing errors more cleanly 2021-06-24 11:37:57 -05:00
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
1583e3be99 more debugging and catch md misconfigured error 2021-06-24 09:43:00 -05:00
954f7f4e80 allow markdown files to specify a redirect
closes #13
2021-06-06 22:24:35 -05:00
afbfab338f properly apply site wrap classes to style wide version
fixes #12
2021-06-03 07:52:01 -05:00
e8377adcf5 allow pages to specify different templates 2021-04-30 19:41:39 -05:00
cde82ab918 don't route /media separately anymore 2021-04-17 11:16:34 -05:00
1ac13f3b9c add some 500 tests for test coverage 2021-04-17 11:08:01 -05:00
30b79e9dc1 add tests for subdir symlinks
this is automagically supported by the previous rewrite
2021-04-17 10:39:05 -05:00
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
c90f0a3a42 treat symlinks as redirects
closes #7
2021-04-15 21:44:02 -05:00
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
be88c3c1bc don't error on breadcrumbs if a dir doesn't have index.md
fixes #8
2021-04-14 21:35:14 -05:00
ced67bec8b allow for serving files directly inside pages/ 2021-04-14 20:45:50 -05:00
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
ce1ed60dd2 allow for configuration to override the favicon
Closes #5
2021-02-27 00:10:03 -06:00
70a8d4f06a add configurable contact email for error pages 2021-02-23 13:11:52 -06:00
39d78af524 add error handler pages for 400, 404, 500 2021-02-21 19:35:52 -06:00
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
dd7687884a remove resolve_page_file, been refactored away 2021-02-20 22:50:56 -06:00
15c88d920b use request path as an alternative to Title metadata 2021-02-20 22:43:42 -06:00
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