Replies: 15 comments 32 replies
-
bloggy things happen? :) |
Beta Was this translation helpful? Give feedback.
-
@Fil, sorry for not being more concrete. I put some details in it. |
Beta Was this translation helpful? Give feedback.
-
Interesting. I don't know how better it is to write 2024-04-01-april-fool.md than having files in folders such as 2024/04/01-april-fool.md. It's probably convenient for some, but is the gain worth the cost, that is, losing the univocal mapping between file and url, and making relative links even more of a headache? Conversely, if you want a flat folder, can't you live with flat urls? The "page's date is made available to the layout template" is related to #1036. I do want to have meta data (dates, authors, tags…) available to the page and to server-side rendering (SSR, #413). Inferring a date from a file name seems like a minor affordance; it could be an application of a hook for inferring the page's meta data from front matter & file contents (it's already the case with the title, which can come from either front matter or from the first H1). For page templates there was a previous attempt (in #253) with discussions and suggestions that I think are still relevant. It would be interesting to be able to show a (structured, formatted…) list of all pages on a given page, maybe also through SSR — the SSR function could itself have access to the configuration, or even read all the contents on disk (like minisearch does). |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
i think the only reason to prefer the jekyll way of handling dates and filenames is that it would make it easier for people who already have jekyll blogs to adopt framework for their data-intensive blogging. jekyll is, by far, the most popular markdown-based blogging tool, as it's built into github pages. |
Beta Was this translation helpful? Give feedback.
-
this "logging" feature is probably the minimal necessary and sufficient requirement to support a blog. |
Beta Was this translation helpful? Give feedback.
-
are you thinking of a script that takes a file named
`2024-04-01-april-fools.md` with a frontmatter like:
```
===
title: awesome post
===
```
to a markdown file named `april-fools.md` with a frontmatter like:
```
===
title: awesome post
date: 2024-04-01
===
```
?
if, so yes. but the bigger issue is not the input format but what the
output looks like like.
if before my post was at example.com/2024/04/01/april-fools.html and now
it’s at example.com/2024-04-01-april-fools.html or
example.com/april-fools.html then that’s going to break links.
|
Beta Was this translation helpful? Give feedback.
-
Long time Jekyll user. I would be very interested in using Framework for blogging and have had the same thought as @fgregg which lead me to this discussion. I don't necessarily think that Framework needs to copy the same conventions as Jekyll. From my initial investigation, the elements that are missing from Framework that could allow for the creation of a DataVis blog are:
These elements may well be possible now within the feature-set of Framework today. If anyone has a suggestions for implementing them then I would really appreciate pointers. |
Beta Was this translation helpful? Give feedback.
-
I've finally managed to support opengraph and twitter cards (#178) in pangea; see for example this page. Since we need absolute URLs and since it only makes sense for public projects, the trick is to use the github repo as the source for the images, instead of adding the images as assets in the data app. The code can be seen here: https://github.com/fil/pangea/blob/main/observablehq.config.ts#L97 ; My implementation is incomplete (lacking a few of the usual fields), but they should be pretty simple to add. Not sure how to fill the description… maybe from the front-matter — or we ask claude to summarize the page? |
Beta Was this translation helpful? Give feedback.
-
I wrote a postbuild script to add a simple sitemap to pangea, with the proper headers that reference it. https://github.com/Fil/pangea/blob/e179717808c66526d5e17a933245f7fe6b91851b/package.json#L7-L8 Making a RSS/Atom file could follow the same approach. |
Beta Was this translation helpful? Give feedback.
-
Adding a script to adopt a "predeploy": "cp -r src/public/* dist/",
"deploy": "yarn predeploy && yarn observable deploy" All of this can be done user-side without too much complexity. All we need now is a template (repo) so that users who don't want to have to think through all of this just have to clone the repo to start their blog. |
Beta Was this translation helpful? Give feedback.
-
I had seen the announcement and tested the comments system, but hadn't seen
the opengraph tags. Can you share how you obtain the absolute url for
og:image?
|
Beta Was this translation helpful? Give feedback.
-
I thought I would post a summary of where I have got to with implementing a blog using Framework. Here is the (very minimal) blog if you would like to take a look. My motivation in choosing Framework is that I eventually want to be able to add posts with interactive explanations and data visualisations (using Observable Plot and D3), and host them on my own domain. Observable Framework is mainly designed for publishing documentation sites and dashboards, so there are some features missing that other static site generators have (like Jekyll, and Astro) which need to be patched in. Creating an index of posts.I have previously written how I implemented this here: #1199 (reply in thread). Issues:
Adding a feedI created a data loader Because data loaders publish a hashed file, I also have to edit the To ensure that Framework builds my feed I also needed to reference the data loader from a page, so I have a hidden page containing a single line: Issues:
HostingI am currently using Netlify to build the site, which "just worked" when I connected the project on Github. I am not sure if this will be as easy if I started to rely on non-js data loaders that require installing or if I start to require network calls to load data when building the site. WishlistSome kind of templating system would be very useful. Different types of pages could be rendered using different templates. Posts could be rendered with a A way to render files to static locations for specific reasons seems important. Hashing all files feels like it is causing problems, especially for images that might need to be consumed from clients like RSS readers, or Open Graph previews on social media. |
Beta Was this translation helpful? Give feedback.
-
I am also using observable framework as a blog - appreciate the inspiration @jamesking ! I spent the weekend migrating examples from earlier this year I made to my personal website/portfolio as I transition out of faculty roles and find a position in industry: Open to any feedback! It's barebones, and I still need to add the og:image functionality from #178 (comment). We will get there! Thank you so much for enabling this! I'm migrating https://jaan.io over to jaan.li from jekyll to observable framework now, in case anyone has tips/pointers :) |
Beta Was this translation helpful? Give feedback.
-
I love where this project is going!
I wonder if y'all would be open to considering adding support for jekyll's blogging pattern.
Namely, that if your markdown file is in a _posts directory, and if its titled like
YEAR-MONTH-DAY-title.MARKUP
then bloggy things happen:For jekyll, this means that,
sites.posts
i.e. to show the latest blog post on the front page jekyll lets you do something like this in anindex.md
.I know that blogs are not your first target use case, but I think it could be a great place to go!
I'd be happy to contribute to this.
Beta Was this translation helpful? Give feedback.
All reactions