1.0.0 • Published 11 months ago
penmark-cms v1.0.0
Penmark 📝🐧
A lightweight CMS you can embed directly into your Markdown-based, Github-backed website/blog. No need to switch between multiple websites, your website/blog is the only place you need.
- Open source 🙌
- No tracking/ads 📡🚫
- WYSIWYG or Markdown support M⬇✍
- Own your data: drafts are stored in your repo 📝
This package is a set of 3 components that allow you to enable this CMS experience:
- Login: used to login to get GitHub credentials
- Drafts: used to create & edit drafts (stored in your own GitHub repo)
- Edit: used to edit existing blog posts
Getting started
Here is how to import these 3 components:
1. Login Component:
1. Add a hidden page of your blog (for instance, /login
). This is intended to be only used by the editor of the blog, not readers of the blog. Anybody accessing this page will see the login buttons.
2. Add the following script to the body:
```html
<script type="module" src="https://cdn.jsdelivr.net/npm/penmark-cms@1.0.0/dist/LoginClient.js"></script>
```
- Drafts Component:
- In your home page of your website, add the following script:
<script type="module" src="https://cdn.jsdelivr.net/npm/penmark-cms@1.0.0/dist/DraftsClient.js"></script>
- This will only be visible when you are logged in, and only GitHub users who have contributor access to the underlying repository will be able to see the drafts.
- In your home page of your website, add the following script:
- Edit Component:
- In each page of your individual blog post, add the following script:
<script type="module" src="https://cdn.jsdelivr.net/npm/penmark-cms@1.0.0/dist/PostClient.js"></script>
- This will add an edit button only for logged in users.
- In each page of your individual blog post, add the following script:
Inspired by utterances.
1.0.0
11 months ago