Up to now it was assumed that the raw wiki text would not be written
as Gemtext, but increasingly that is not the case. This commit adds
handling of Gemtext links.
gemini_link now handles URLs and is used for all links in
serve_gemini_page.
Paragraph splits now happen at the beginning of list items and when
line breaks are requested. It's not great but what else are you going
to do?
Handle image links.
Handle HTML tags (by ignoring them).
Raw pages served as text/plain instead of text/markdown.
Makefile now also has a gemini target to start up a gemini wiki. It
also calls openssl to generate keys if necessary.
gemini-server.pl now also has log messages in the various functions
serving content, instead of having some of them in the main function.
The footer is printed in a separate function.
Fixed sorting. Added \r to some of the links. Allow loading
gemini-server.pl as a library. Don't force the display of ten links in
the main menu unless we actually have as many day pages. Change URL
for minor recent changes.
Fixed [URL text] and [[in-reply-to:URL|text]] patterns: don't pass an
URL to gemini_link!
Some log output when writing files. Don't double-decode UTF-8 when
writing text pages.
Render pages ending in '.txt' as raw text. No folding of robots.txt!
Fix two confusing calls to UrlEncode at the end: when serving Gemini
pages and raw text pages, don't URL-encode the page names, use
FreeToNormal to get valid page ids!
Fiddle with the block parsing... Perhaps the single /\n\* / match is
unnecessary? Let's wait for a case where this is wrong. Basically that
would be a paragraph followed immediately by a list item
* like this
I don't think people write it like this when writing for the wiki.
Support the special case <journal search tag:foo> for tag pages.
Fix handling of newlines for blocks that are just links and the like.
No longer wrap paragraphs. In fact, unwrap paragraphs and list items
because that's what the specification says: Each line is to be wrapped
separately.
Allow single line/paragraph comments. This requires the QuestionAsker
extension and supports the questions and answers.
Support in-reply-to links. Support Markdown links.
Sort pages and their comments correctly even if not day pages.
Fix URL-encoding of $id whenever a URL is printed (for redirection
using 30 and 31, for example), and fix normal form (underscores
instead of spaces for $id).
Do not URL-escape the slash.
Reorganize the main menu and add a 'New page' link.
Change the tag format from $id/tag to tag/$id.
Change the naming so that "text page" is now a "raw page" served via
raw/$id.
Only allow editing of raw pages.
Improve transformation of wiki raw text to Gemini format. Handle tags
with alternate text and images.
Add a footer to Gemini format pages.
When editing existing pages, always make it a minor edit. That matches
how I use the wiki as a blog. It might not be correct for a wiki used
as an encyclopedia.
Handle spaces in $id.