Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 2.25 KB

README.md

File metadata and controls

57 lines (43 loc) · 2.25 KB

Blogdown-CMS

Content Management System, to provide API endpoints for Static Site Generators or JAMStacks

App preview

Features

  • Extended markdown
  • Extended with Handlebars
    • {{{github 'patarapolw/blogdown-cms'}}} for embedding GitHub links
    • {{{card url}}} for embedding link previews with image
    • {{{pdf url}}} for embedding PDF
    • {{{reveal slug}}} for embedding reveal MD
    • Quoting can be " or ', and is optional, thanks to shlex.ts
  • Reveal MD for PowerPoint-esque presentation
  • No specific framework is required for styling
    • You might need to disable CSS reset to enable native Markdown styling
  • The Heroku hosted REST API exposes an OpenAPI documentation
  • Search syntax is powered by patarapow/qsearch via exposed REST API. So, you can query MongoDB with a string instead of JSON.

How it works

This project uses the following endpoints

  • MongoDB for storing text-based contents
  • Heroku to provide public API endpoints to MongoDB
  • Cloudinary is used to store media (e.g. images)
  • Editing is only enabled offline
    • via npm run dev

Environmental variables

  • All the following environmental variables, except for MONGO_URI are optional. If you need a MongoDB server, you might try MongoDB Atlas or local docker image.
  • Put the .env file inside /packages/server/
MONGO_URI=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_CLOUD_NAME=
  • Client side .env will be needed if you want to host Reveal MD, namely BASE_URL
  • Put the .env file inside /packages/admin-web/
BASE_URL=

Running the app

  • Development mode -- npm run dev
  • Building the Docker and run -- npm run build && npm start
  • Deploy to Heroku -- npm run deploy (Don't forget to heroku create first)