“All the News That’s Omg Lol”

Online Edition
As if we’d actually use ink for this?

Vol. 25 of 35
June 1, 2023 2:51 AM UTC

weblog.lol: New entry statuses, URL mapping, and content chunks

Hey folks! Today I have three fun (and hopefully useful) weblog.lol updates to share. Let’s dig right in.

Entry Statuses

Until now, the Status entry metadata was really only good for one thing—marking posts as Draft. Today, there are three new statuses that you can apply to your entries to suit different needs/scenarios:

  1. Status: Unlisted will make an entry accessible only to people who know its URL. It won’t be served as a default/landing page, appear in the post list or recent posts, be included on tag pages, etc.
  2. Status: Web Only will completely hide an entry from the RSS, Atom, and JSON feeds.
  3. Status: Feed Only does the opposite, treating the entry as unlisted on the web, but including it in the feeds.

These new statuses should allow for some fun flexibility when working with your weblog entries. Thanks to @darylsun for the suggestion!

URL Mapping

@anniegreens recently raised an interesting use case for some additional flexibility in handling how external domains can be used with weblog.lol. This led to a brand new URL mapping feature. It lets you say “if the URL in the browser is X, I want you to show the weblog entry located at Y.” In @anniegreen’s case, this was to allow an external domain to point to a specific weblog page without having to make that page the weblog’s landing page (which would have been the only way to do this before).

To use URL mapping, just plop some URL map directives in your weblog configuration, like this:

;; URL Mapping
;; -----------

URL map: foobar.cool -> /landing
URL map: something.else -> /elsewhere

In this example, visiting the domain foobar.cool (added to the Switchboard and pointed to Weblog) would result in serving the same content that’s located at https://foobar.weblog.lol/landing, but there’s no need to append the /landing path because of the mapping. The second entry is just there to demonstrate that you can have multiple URL maps in place (add as many as you’d like).

Content Chunks

This last new feature has been requested multiple times by several people, and I feel bad that I can’t remember/find all of the past times that it’s come up, but @andyn brought it up most recently. I’m calling this feature “content chunks” because that’s pretty much exactly what it is. Right now there are two content chunks available: profile for your profile page, and now for your /now page (both surrounded by curly braces, as usual). If you put those tags in a weblog post or page, they’ll be replaced with your profile or /now page respectively.

The output will include all of the typical omg.lol substitutions that you’d expect (within the profile/now page editor system), as well as icons — though you’ll need to ensure that your weblog template pulls in the relevant CSS for Font Awesome or the omg.lol icon font if you want the icons to appear (you can grab these by viewing the source of your profile page or /now page). It’s also important to note that there’s no styling or theming here, by design — you’re just getting the raw markup for those content chunks, devoid of any existing themes or CSS that you may have applied to your profile/now pages. This is so that you can use your own weblog-specific styles, which I’d imagine most people would want to do.

You might be thinking, “hey, cool, can we get content chunks for status.lol, some.pics, etc. too?” The answer is heck yes, but I’m just going to need a little time to do it smoothly and nicely. (Mostly I just want to see how things go with embedded profile and /now content first, before we go too crazy.)

I hope these updates are helpful. As usual, if you have any questions, feel free to toss them into discourse.lol, or you’re welcome to drop into IRC or Discord, or toot about it on Mastodon.

Have fun!

— Adam