Commit Graph

10 Commits (master)

Author SHA1 Message Date
Mike Gerwitz 8448669355
Use MathML for mathematics on posts
We're finally in an era where this is natively supported on all major
browers and platforms, at least on modern browsers.  I've been waiting
for this for...nearly 15 years now?  My go-to previously was Mathjax.

I guess I should remove my IE11 support in CSS, then, huh?

Or maybe leave it around as an easter egg / relic type of thing.
2024-03-18 23:36:59 -04:00
Mike Gerwitz 8ce8b5a7f7
HTML details styling and parsing improvements
The article I'm working on makes (very) heavy use of the `details` HTML
element, and nests them.  Making sense of the article without
indentation is difficult and torturous.

This has complicated the prefmt script enough that it really ought to be
extracted into something else.  I'm admittedly disappointed that I've
had to do this much work with it, because it completely sacrifies any
hope of portability.  Oh well, that's not even a design goal, though
it'd be nice to be able to have the preview of Markdown files make sense
in e.g. Forejo.

I figured I'd have the least numbre of problems with nesting if I strip
whitespace prefixes based on the current level of nesting.  To avoid
surprises, I enforce expectations statically---it will not compile
without proper nesting.

To reduce the potential blast radius, I'm doing this only for `details`
for now; it'll expand later on.  I did diff the output of older articles
to make sure they were unaffected.
2024-03-18 23:32:57 -04:00
Mike Gerwitz 8c92c57faa
Use pandoc-generated source code highlighting CSS
I previously included hard-coded CSS.  Pandoc will apparently generate
what is needed for the page, but I didn't have that included in my
template.

I chose Tango out of a nearly 20y personal preference now, ever since I
used the Tango Icon Theme in Ubunutu Dapper Drake (6.06), my introducing
to GNOME/GTK.  I might have used Breezy, too, I don't recall.

Prior to that I think I used Mandrake (before it was Mandriva), which
was the first distro I tried, after my laptop's HDD died and I was
awaiting a replacement (couldn't run Windows without a HDD).

...anyway.
2024-03-18 23:28:46 -04:00
Mike Gerwitz 99a1c4e015
Support for pandoc 2.19.2
Previous I had been using pandoc 2.9.2.1, available through the Debian
repositories.  I installed 2.19.2 through Guix.

The biggest issue I ran into was wrapping of the output, which messed up
my klugy post-processing scripts that expected `h1` tags to have their
attributes all on the same line.  The `--wrap none` flag resolves that.

I diff'd the webroot before and after these changes.  The primary
changes were related to footnote classes, the recognition of fancy
quotes in a couple new situations, and new classes introduced to source
code listings.  I'll have to investigate styling them, since I haven't
visited the CSS for that in quite some time.
2024-03-17 23:21:26 -04:00
Mike Gerwitz 88b9b2dee2
src/post2html: Disable TeX-style tie parsing in fences
Code fences are meant to indicate literal text, not formatted.
2024-03-17 22:05:13 -04:00
Mike Gerwitz cdf9cac4e9
src/post2html: Use forge.mikegerwitz.com for post history
The date on posts is supposed to be a link to the commit history for
that post.  This was broken when moving to forgejo.
2023-08-08 00:58:19 -04:00
Mike Gerwitz 61b80c516f
src/post2html: Ability to reference content of previous fence
I'll be using this to show example HTML code and then output it as actual
HTML to be rendered as part of the article.  Otherwise the HMTL has to be
duplicated and maintained in multiple places.

An alternative is to include a file, but that is much less convenient for
smaller snippets.
2020-03-31 23:47:38 -04:00
Mike Gerwitz 5b84305d8e
src/post2html (prefmt): Ties and newline stripping
I hate Markdown as a format for disciplined writing, especially when I want
macros (mostly semantic), indexes, and such.  I was originally going to use
LaTeX with Pandoc, but it lacks support for inline HTML and such, and I do
not want to distract too much from the work that I want to be doing.
2020-03-31 23:47:12 -04:00
Mike Gerwitz 6d9defe292
Link to source code of post
Rather than displaying the hash separately, this just makes the date a link
to the source code.  Until I display a modification date, this will also
make it easy to see the history of the file.
2019-01-17 01:29:46 -05:00
Mike Gerwitz b182ea79b3
Majority of work on generation of new static site
I didn't originally intend for all of this to be in a single commit.  But
here we are.  I don't have the time to split these up more cleanly; this
project is taking more time than I originally hoped that it would.

This is a new static site generator.  More information to follow in the
near future (hopefully in the form of an article), but repo2html is now
removed.  See code comments for additional information; I tried to make it
suitable as a learning resource for others.  It is essentially a set of
shell scripts with a fairly robust build for incremental generation.

The site has changed drastically, reflecting that its purpose has changed
over the years: it is now intended for publishing quality works (or at least
I hope), not just a braindump.

This retains most of the text of the original pages verbatim, with the
exception of the About page.  Other pages may have their text modified in
commits that follow.

Enhancements to follow in future commits.
2019-01-11 23:46:13 -05:00