💾 Archived View for midnight.pub › replies › 504 captured on 2022-03-01 at 17:36:36. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
Whaddayamean mangled? I tried converting a few of them and they look fine.
I tried with pandoc, which just handled it straight up, and kramdown, where I needed to first strip out the YAML preamble. Like this:
sed -e '1,/^---$/d' /tmp/writing-html-in.txt|kramdown
Those .txt files are pure markdown. There aren't any m4 macros.
This is one of the templates I used in the last version of my site. I've found that using pandoc or lowdown to process markdown in this template mangles the HTML that comes out of the includes. But if I write markdown and pipe the output of pandoc/lowdown to xclip, I can paste it into a template instead of doing HTML by hand, so I suppose that will do.
m4_include(website.m4) m4_define([__title], []) m4_define([__description], []) m4_include(article-header.html) <section> </section> m4_include(footer.html)
Here are the contents of "website.m4", if you're interested.
m4_divert(-1) website.m4 © 2021 Matthew Graybosch <contact@matthewgraybosch.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. m4_divert m4_changequote(`[',`]') m4_define([__site], [Matthew Graybosch]) m4_define([__url], [https://matthewgraybosch.com/]) m4_define([__tagline], [author by choice, techie by necessity]) m4_define([__lang], [en-us]) m4_define([__title], [Home]) m4_define([__description], [__tagline()]) m4_define([__copyright], [2021]) m4_define([__feed1], [__url()feed.xml]) m4_define([__feed1_desc], [__site() Atom Feed]) m4_define([__feed2], [__url()100days.xml]) m4_define([__feed2_desc], [__site(): #100DaysToOffload]) m4_define([__style], [__url()assets/css/main.css]) m4_define([__manifest], [__url()assets/text/site.webmanifest]) m4_define([__icon180], [__url()assets/images/apple-touch-icon.png]) m4_define([__icon32], [__url()assets/images/favicon-32x32.png]) m4_define([__icon16], [__url()assets/images/favicon-16x16.png]) m4_define([__og_url], [http://alwaysownyourplatform.com]) m4_define([__og_title], [Boycott Social Media]) m4_define([__og_description], [Please share my website on your own website.]) m4_define([__og_image], [__url()assets/images/no-social.jpg]) m4_define([__webmaster], [webmaster@matthewgraybosch.com]) m4_define([__400], [<q>What we've got here is failure to communicate.</q> ~<i>Cool Hand Luke</i>]) m4_define([__401], [<q>Speak, friend, and enter.</q> ~<i>The Lord of the Rings</i>]) m4_define([__402], [<q>Fuck you. Pay me.</q> ~<i>GoodFellas</i>]) m4_define([__403], [<q>None shall pass.</q> ~<i>Monty Python and the Holy Grail</i>]) m4_define([__404], [<q>Dave's not here, man.</q> ~Cheech & Chong]) m4_define([__410], [<q>He's dead, Jim.</q> ~<i>Star Trek</i>]) m4_define([__451], [<q>It was a pleasure to burn.</q> ~Ray Bradbury, <i>Fahrenheit 451</i>]) m4_define([__500], [<q>Even in the future nothing works.</q> ~<i>Spaceballs</i>]) m4_define([__policy], [default-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'none'; img-src 'self'; style-src __style(); manifest-src __manifest();]) m4_define([__permissions], [accelerometer=(); ambient-light-sensor=(); autoplay=(); battery=(); camera=(); display-capture=(); document-domain=(); encrypted-media=(); execution-while-not-rendered=(); execution-while-out-of-viewport=(); fullscreen=(); geolocation=(); gyroscope=(); layout-animations=(); legacy-image-formats=(); magnetometer=(); microphone=(); midi=(); navigation-override=(); oversized-images=(); payment=(); picture-in-picture=(); publickey-credentials-get=(); sync-xhr=(); vr=(); wake-lock=(); screen-wake-lock=(); web-share=(self); xr-spatial-tracking=();]) m4_define([__license], [rel="license noopener noreferrer"]) m4_define([__safe_rel], [rel="noopener noreferrer"]) m4_define([__nofollow], [rel="noopener noreferrer nofollow"]) m4_define([__newtab], [target="_blank"]) m4_define([__toplink],[<a href="#top" title="return to the top of the page">top</a>])