Skip to content

Repository files navigation

Open GitHub PDF files directly in the browser by prefixing github.com with pdf.

- https://github.com/bogdannbv/pdfgithub.com/blob/main/example/file.pdf+ https://pdfgithub.com/bogdannbv/pdfgithub.com/blob/main/example/file.pdf

The app rewrites GitHub PDF URLs to GitHub's raw content host and streams the PDF response back to the browser.

Usage

  1. Find a GitHub URL that points to a .pdf file.
  2. Replace github.com with pdfgithub.com.
  3. Open the new URL in your browser.

The root (/) page shows a small usage guide.

Run Locally

Create a .env file:

cp .env.example .env

Run the app:

go run ./cmd

With the default example config, open:

http://localhost:8080

Configuration

VariableDescriptionDefault
HTTP_BIND_HOSTHost address the HTTP server binds to.0.0.0.0
HTTP_BIND_PORTPort the HTTP server listens on.80
APP_ENVSet to local to use debug-level logging.info-level
GH_TOKENGH Personal access token with public repo read accessnone, required

About

View PDF files from GitHub directly in your browser by prefixing "github.com" with "pdf". No downloads required.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages