mataroa-blog / mataroa

Naked blogging platform
https://mataroa.blog
GNU Affero General Public License v3.0
265 stars 21 forks source link

Feature Suggestion: API access to pages #52

Open jessepav opened 1 year ago

jessepav commented 1 year ago

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/.

sirodoht commented 1 year ago

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.

jessepav commented 1 year ago

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.

berniethewordsmith commented 1 year ago

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.

jessepav commented 4 months ago

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

sirodoht commented 4 months ago

oh, that was probably a mistake

tmplt commented 1 week ago

Wider API support for pages would be great.

I would like to create a Emacs package for Mataroa that allows a blog to be wholly defined in org-mode. Posts are currently doable, and I'd ideally like all fields accessible via API, but page support would be sufficient to make it worth the effort.