mataroa icon indicating copy to clipboard operation
mataroa copied to clipboard

Feature Suggestion: API access to pages

Open jessepav opened this issue 2 years ago • 6 comments

Currently access to pages (as opposed to posts) is not supported by the API (and pages are also not exported via https://mataroa.blog/export/).

It would be great to have pages access, both for data portability and so that one need not use draft posts as API-accessible "semi-pages".

The API design could parallel the posts API almost exactly, simply substituting /api/pages/ for /api/posts/.

jessepav avatar Oct 18 '23 16:10 jessepav

Hi @jessepav!

Thanks for opening this issue! I think that's a good idea. The only thing on my mind is that the goal of mataroa is to have a simple blog. Things like the API, as well as a potential pages API, sound extra — unless I'm missing something in terms of its conduciveness to writing texts.

To explain a bit more, in my way of using mataroa, I change the content of the pages once a year. The rest of the year I just click 'New post' or 'Edit post'.

But maybe a blot.im-like capability for pages could be useful too. In the sense that someone makes a CLI tool that syncs both posts and pages, and that helps them write posts and pages in their local editor rather than a possibly annoying textarea on their distracting browser.

sirodoht avatar Oct 19 '23 11:10 sirodoht

Even for simple blogs, a few pages seem necessary, and these pages are often related to other pages, benefiting from scriptability.

For instance, both nutcroft.com and hey.mataroa.blog have a non-trivial page (the TOC and Changelog respectively). If the TOC were generated from tags in posts, or the Changelog taken from the git repo, then these would often need to updated in concert with the posts, and not needing to cut-and-paste into the browser would be a boon.

jessepav avatar Oct 19 '23 13:10 jessepav

Hi @jessepav!

Thanks for opening this issue! I think that's a good idea. The only thing on my mind is that the goal of mataroa is to have a simple blog. Things like the API, as well as a potential pages API, sound extra — unless I'm missing something in terms of its conduciveness to writing texts.

To explain a bit more, in my way of using mataroa, I change the content of the pages once a year. The rest of the year I just click 'New post' or 'Edit post'.

But maybe a blot.im-like capability for pages could be useful too. In the sense that someone makes a CLI tool that syncs both posts and pages, and that helps them write posts and pages in their local editor rather than a possibly annoying textarea on their distracting browser.

A blot-like functionality would be amazing. Blot was one of the services I considered before, but I chose Mataroa because your usage policy is better aligned with my beliefs. Amazing job by the way.

berniethewordsmith avatar Nov 08 '23 19:11 berniethewordsmith

I'm not sure how that commit relates to this feature suggestion?

jessepav avatar Jul 19 '24 06:07 jessepav

oh, that was probably a mistake

sirodoht avatar Jul 19 '24 08:07 sirodoht