Skip to content

adriangabardo/ghmarkdown

Repository files navigation

GitHub Markdown Webpage Renderer

Overview

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.

Getting started

The first step is likely to be forking this repository for your own usage. Then:

Starting in development

Environment Variables

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

Starting the environment

yarn # or npm i
yarn dev # or npm run dev

Deployment

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.

About

A NextJS application to render markdown files from GitHub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published