Follow

I'm looking to start blogging again starting this week. I'm really trying hard to work with the write as api but I keep running into issues.

I might just end up going with something like Gatsby instead, we'll see.

@sneakycrow

I did this as well, it was a lot of fun but eventually felt overkill for my static blog. Hugo is nice if you just want to generate static pages, or Jekyll if ruby is more your jam

@robjloranger I like Jekyll a lot. Hugo I haven't used a whole lot. Of the three I'm preferable to Gatsby just because of my familiarity with React.

@sneakycrow

I really like Gatsby, and react. I just haven't had a chance to work with it. Other than trying it out for my blog.

@robjloranger I'm getting this odd thing while using `nextjs`. It *might* be a nextjs issue, but I do experience it in curl sometimes too so I don't think it is.
Basically, when I do an initial fetch request to the /api/me/posts endpoint, I get the data, but if I follow it up with a second request it 404s me (same endpoint).
Another odd thing, I'd prefer to not use that endpoint (I don't want to require an api key), but the /collections/sneakycrow endpoint just 302s me. That collection (blog) is public

@sneakycrow

What header are you sending with the request to the pubic endpoint?

@sneakycrow

So the endpoint `/api/collections/sneakycrow` is looking for the `Content-Type: application/json` header, with that there is no 302.

There is a PR open to also accept the `Accept` header of the same value.

Then if you use `/api/collections/sneakycrow/posts` you get all your posts. This is all without an authorization header.

There is currently no pagination on api routes, afaik.

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!