💾 Archived View for gemi.dev › gemini-mailing-list › 000299.gmi captured on 2024-08-25 at 10:48:16. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-12-28)
-=-=-=-=-=-=-
Right now, my personal site https://catgirl.ai is generated using a static site generator (Zola). I have a git repo with a bunch of markdown files, and when I want to update it I build and rsync to the server. Pretty standard stuff. I'd like to serve it over Gemini as well. So I'm working on a project <https://github.com/deifactor/exarch> to do so. But now I'm thinking: since Gemini servers are super easy to write, maybe instead of converting the markdown to Gemtext and serving that using a generic Gemini server, maybe I could have Exarch serve the md files and do the conversion directly, sa well as the 'template' files I use to generate the lists of posts. And then I just copy over the entire repo and run `exarch serve repo-root` to serve it via Gemini (or define an archive format that contains all the gmi files and templates and such). What do you all think? ps: I haven't looked too deeply to see if there's an existing solution, because I want an excuse to learn async Rust :)
It was thus said that the Great ext0l at riseup.net once stated: > > I'd like to serve it over Gemini as well. So I'm working on a project > <https://github.com/deifactor/exarch> to do so. But now I'm thinking: > since Gemini servers are super easy to write, maybe instead of > converting the markdown to Gemtext and serving that using a generic > Gemini server, maybe I could have Exarch serve the md files and do the > conversion directly, sa well as the 'template' files I use to generate > the lists of posts. And then I just copy over the entire repo and run > `exarch serve repo-root` to serve it via Gemini (or define an archive > format that contains all the gmi files and templates and such). > > What do you all think? Sounds like a great idea. I just finished a module [1] for my own Gemini server [2] that will convert an entry on my blog [3] from HTML to Gemini [4]. Although in doing the conversion, I wasn't completely satisfied with the results due to the simplified nature of Gemin text compared to HTML. It works, but there are some cases (like nested <BLOCKQUOTE>s or tables) that might end up looking a bit wierd. -spc [1] gemini://gemini.conman.org/extensions/GLV-1/handlers/blog.lua [2] https://github.com/spc476/GLV-1.12556 [3] http://boston.conman.org/ [4] The feed file: gemini://gemini.conman.org/gemlog.gmini The archive: gemini://gemini.conman.org/boston/
On 2020-07-16 19:16, Sean Conner wrote: > It was thus said that the Great ext0l at riseup.net once stated: >> >> I'd like to serve it over Gemini as well. So I'm working on a project >> <https://github.com/deifactor/exarch> to do so. But now I'm thinking: >> since Gemini servers are super easy to write, maybe instead of >> converting the markdown to Gemtext and serving that using a generic >> Gemini server, maybe I could have Exarch serve the md files and do the >> conversion directly, sa well as the 'template' files I use to generate >> the lists of posts. And then I just copy over the entire repo and run >> `exarch serve repo-root` to serve it via Gemini (or define an archive >> format that contains all the gmi files and templates and such). >> >> What do you all think? > > Sounds like a great idea. I just finished a module [1] for my own Gemini > server [2] that will convert an entry on my blog [3] from HTML to Gemini > [4]. Although in doing the conversion, I wasn't completely satisfied with > the results due to the simplified nature of Gemin text compared to HTML. It > works, but there are some cases (like nested <BLOCKQUOTE>s or tables) that > might end up looking a bit wierd. > > -spc > > [1] gemini://gemini.conman.org/extensions/GLV-1/handlers/blog.lua > > [2] https://github.com/spc476/GLV-1.12556 > > [3] http://boston.conman.org/ > > [4] The feed file: > > gemini://gemini.conman.org/gemlog.gmini > > The archive: > > gemini://gemini.conman.org/boston/ Yeah, I briefly considered starting from the HTML output since that'd let me ensure that everything looks the same, but then I'd wind up doing a bunch of weird stuff to work with elements of the HTML that shouldn't be replicated (having a title link at the top of each page is idiomatic HTML, but doesn't seem to be idiomatic Gemtext).
It was thus said that the Great ext0l at riseup.net once stated: > > Yeah, I briefly considered starting from the HTML output since that'd > let me ensure that everything looks the same, but then I'd wind up doing > a bunch of weird stuff to work with elements of the HTML that shouldn't > be replicated (having a title link at the top of each page is idiomatic > HTML, but doesn't seem to be idiomatic Gemtext). Each of my blog entries is stored in HTML, but not as a complete page. Bascially, my HTML parser doesn't have to bother with <HTML>, <HEAD> (and the associated tags that appear there), and the <BODY> tag itself---it only has to deal with the tags that I use (<P>, <BLOCKQUOTE>, <DL>, <UL>, etc). But who's to say you even have to convert everything? You see a <TITLE>? Skip over that. You can tailor both the parser and the ouput to how you do things. -spc (Just an idea ... )
On Thu, 2020-07-16 at 18:10 -0700, ext0l at riseup.net wrote: > maybe I could have Exarch serve the md files and do > the > conversion directly, sa well as the 'template' files I use to > generate > the lists of posts. And then I just copy over the entire repo and run > `exarch serve repo-root` to serve it via Gemini (or define an archive > format that contains all the gmi files and templates and such). > > What do you all think? > I do the same (using Perl). Except I take the raw wiki text (which may or may not look like Markdown, haha) and convert it to gemtext on the fly. Works reasonably well! Cheers Alex
> ps: I haven't looked too deeply to see if there's an existing solution, > because I want an excuse to learn async Rust :) An admirable goal :) I've written a markdown to gemini converter in Python though, if that's helpful/useful. https://github.com/makeworld-the-better-one/md2gemini I've been thinking about setting up a demo server that converts markdown to gemini on the fly using it, might be interesting. Although I didn't really write it with performance in mind, so I'd have to see how it plays out for longer documents. Cheers, makeworld
On 2020-07-17 08:30, colecmac at protonmail.com wrote: >> ps: I haven't looked too deeply to see if there's an existing solution, >> because I want an excuse to learn async Rust :) > > An admirable goal :) > I've written a markdown to gemini converter in Python though, if that's > helpful/useful. > > https://github.com/makeworld-the-better-one/md2gemini > > I've been thinking about setting up a demo server that converts > markdown to gemini on the fly using it, might be interesting. Although > I didn't really write it with performance in mind, so I'd have to see > how it plays out for longer documents. > > Cheers, > makeworld Yeah, I came across that and it works great! I just felt like trying to write my own thing in Rust because it's fun, though I'm cribbing your paragraph link mode for Exarch. (One of my other project ideas was a fancy terminal-interface client with color support, and then I found amfora... so instead I just packaged it for NixOS and decided to write Exarch instead.)
Hi there, robot! On Fri, 17 Jul 2020 at 04:10, <ext0l at riseup.net> wrote: > I'd like to serve it over Gemini as well. So I'm working on a project > <https://github.com/deifactor/exarch> to do so. Nice project! I also have a Zola site and would like something similar for Gemini. I did actually implement a rudimentary non-HTML support in Zola itself [0] but it (understandably) feels like the maintainer doesn't like the direction this would take the project. I contemplated a Zola fork but it's quite HTML centric so not sure about that. [0] https://github.com/getzola/zola/pull/1059 If you want my opinions I think building static files is much better than generating static content on request. And the big features in Zola that would adapt to Gemini are template support and Atom feeds. Still, I'm not sure if it's worthwhile to try adapting the same content to Gemini. I think a simpler static site generator without markdown might be more suited. Now that I think about it, I should think about a Gemini specific SSG a bit more. I've broken stuff with my Makefile+gemfeed+md2gemini based weird system too many times. (Most recently I broke some Atom timestamps today, and I haven't yet fixed that.) -Hannu
On 7/19/20 8:55 AM, Hannu Hartikainen wrote: > Hi there, robot! > > On Fri, 17 Jul 2020 at 04:10, <ext0l at riseup.net> wrote: >> I'd like to serve it over Gemini as well. So I'm working on a project >> <https://github.com/deifactor/exarch> to do so. > > Nice project! I also have a Zola site and would like something similar > for Gemini. I did actually implement a rudimentary non-HTML support in > Zola itself [0] but it (understandably) feels like the maintainer > doesn't like the direction this would take the project. I contemplated > a Zola fork but it's quite HTML centric so not sure about that. > > [0] https://github.com/getzola/zola/pull/1059 > > If you want my opinions I think building static files is much better > than generating static content on request. And the big features in > Zola that would adapt to Gemini are template support and Atom feeds. > Still, I'm not sure if it's worthwhile to try adapting the same > content to Gemini. I think a simpler static site generator without > markdown might be more suited. > > Now that I think about it, I should think about a Gemini specific SSG > a bit more. I've broken stuff with my Makefile+gemfeed+md2gemini based > weird system too many times. (Most recently I broke some Atom > timestamps today, and I haven't yet fixed that.) > > -Hannu > ? I'd like to keep Markdown support, but mostly so I can reuse the same pages of actual content (the posts and everything). The templates I'm probably just going to ignore; my plan is that each section just automatically gets a link to every post it contains appended to its (rendered) _index.md. This is more 'Exarch's file structure is compatible with Zola's, so you can run Exarch on a Zola markdown repository' than aiming for feature parity with Zola. If I wanted that, I'd just tell people to use a HTTP-Gemini proxy or something. (p.s., how come Microsoft is the only mainstream vendor that has a good robot emoji? Mutant Standard [0] is my favorite, which is why I used a variant of it as my favicon. Everything else feels too... toylike.) [0] https://blog.mutant.tech/wp-content/uploads/2019/04/Screenshot-2019-04-29-at-15.47.37.png
---
Previous Thread: The Transjovian Vault: moving my Wikipedia Proxy to a separate domain