This project leverages Octokit.js, Mantine's Rich Text Editor and Showdown.JS's HTML→Markdown converter to create a website that reads through any of a user's Github Repositories (including private ones) and serves all their Markdown files in the root directory of said repository.
The first step is likely to be forking this repository for your own usage. Then:
Create a .env.local
file in the root of the repository, in said file you need the following:
PAT=
REPOSITORY=
- PAT - GitHub Personal Access Token - DO NOT COMMIT TO REPOSITORY
- REPOSITORY - Which repository linked to the same account as the above's PAT will we fetch Markdown files from (the repository can be private)
The PAT needs the following scoped permissions:
- repo:*
- read:user
yarn # or npm i
yarn dev # or npm run dev
This is a Next.JS application, deploying to Vercel's environment is the easiest way to get it served. Follow their instructions on https://vercel.com/solutions/nextjs.
The only extra step to follow is to set your environment variables on deployment just like the above .env.local
.