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.pdfThe app rewrites GitHub PDF URLs to GitHub's raw content host and streams the PDF response back to the browser.
- Find a GitHub URL that points to a
.pdffile. - Replace
github.comwithpdfgithub.com. - Open the new URL in your browser.
The root page and /usage show a small usage guide.
Create a .env file:
cp .env.example .envRun the app:
go run .With the default example config, open:
http://localhost:8080
| Variable | Description | Default |
|---|---|---|
HTTP_BIND_HOST |
Host address the HTTP server binds to. | 0.0.0.0 |
HTTP_BIND_PORT |
Port the HTTP server listens on. | 80 |
APP_ENV |
Set to local to use debug-level logging. |
info-level |