Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JasonEtco/readme-guestbook
A little web app that transforms a README into a guestbook.
https://github.com/JasonEtco/readme-guestbook
Last synced: 1 day ago
JSON representation
A little web app that transforms a README into a guestbook.
- Host: GitHub
- URL: https://github.com/JasonEtco/readme-guestbook
- Owner: JasonEtco
- License: mit
- Archived: true
- Created: 2020-05-28T02:39:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T19:21:20.000Z (over 2 years ago)
- Last Synced: 2024-08-02T19:35:25.417Z (3 months ago)
- Language: HTML
- Homepage: https://readme-guestbook.now.sh
- Size: 365 KB
- Stars: 21
- Watchers: 3
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeGithubProfileTemplates - readme-guestbook - Web app that transforms a README into a guestbook (Resources / Tools)
README
README Guestbook
A little web app that transforms a README into a guestbook.
Let me know that you stopped by!
## How it works
When someone visits `readme-guestbook.vercel.app`, they're asked to login. This is so that we can sign their entry! Next, they submit a form, which hits [the form handler](/api/submit-form.ts).
Next, we call this API to fetch the contents of the README:
```
GET /repos/:owner/:repo/readme
```Once we have the content, we parse it to look for special tags:
```md
...
```
`GUESTBOOK_LIST` is a JSON array of `{ name, message, date }`. We store those objects directly in the README. When a new entry comes in, we read that existing list, add our new entry to it, then replace everything between the `START_SECTION` and `END_SECTION` tags with a freshly rendered list from a template. That brings us to calling this API to update the file contents of the README:
```
PUT /repos/:owner/:repo/contents/:path
```Some values are hard-coded - I'm not yet sure of the best way to allow others to use this service! Feel free to [open an issue](https://github.com/JasonEtco/readme-guestbook/issues/new) if you have thoughts 🙏