Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

astro-paper can also be headless CMS #105

Open
xiyuvi opened this issue Aug 8, 2023 · 4 comments
Open

astro-paper can also be headless CMS #105

xiyuvi opened this issue Aug 8, 2023 · 4 comments

Comments

@xiyuvi
Copy link

xiyuvi commented Aug 8, 2023

I want to create a static JSON data from the article list and Markdown document, which can be used by other external programs。
I hope astro can support this feature, so that astro can play the role of headless CMS. Thank you very much

@mattppal
Copy link

mattppal commented Aug 8, 2023

This would actually be quite helpful for me as well— I assume you're trying to import into something like Ghost? I spent a little while playing around with it, but it seems quite complex.

We'd need a way to export the markdown files to mobiledoc in that case...

@satnaing
Copy link
Owner

Sounds interesting.
I've never used (and imagined to do) something like this. I mean I'm unfamiliar with this kind of stuff.
Thus, can you please explain a bit more?
Like

  • the need to export JSON data extracted from blog contents?
  • how about the contents inside the config file?
  • etc

@mattppal
Copy link

@satnaing I spent sometime playing with Ghost (here's a useful repo and the astro docs)

The issue comes with supplying the Ghost API with content— it seems particularly difficult to accomplish with how AstroPaper is structured.

I also came across TS Ghost, which might be interesting.

@xiyuvi
Copy link
Author

xiyuvi commented Oct 8, 2023

Sounds interesting. I've never used (and imagined to do) something like this. I mean I'm unfamiliar with this kind of stuff. Thus, can you please explain a bit more? Like

  • the need to export JSON data extracted from blog contents?
  • how about the contents inside the config file?
  • etc

Like this, perhaps you have heard of Hexo, which is a static blog generator. Hexo has a plugin called "Hexo generator restful", which can generate JSON format APIs from MD documents for third-party calls.

https://github.com/yscoder/hexo-generator-restful

https://xiyu.pro/api/posts.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants