GitHub-hosted content shelf. Fork, upload, done.
Fork this repo to get your own content platform on GitHub Pages. Upload PDFs or EPUBs (converted into online books), Markdown documents (rendered directly), or ZIP archives (deployed as static sites). Zero server cost.
- Click Fork on this repository
- In your fork, go to Settings > Pages
- Under Source, select GitHub Actions
- Go to the Actions tab, select Deploy to GitHub Pages, click Run workflow to trigger the first deployment
Your site is now live at https://<your-username>.github.io/gitshelf/
- Register at mineru.net (free during beta)
- Copy your API token
- In your fork, go to Settings > Secrets and variables > Actions
- Click New repository secret, name it
MINERU_TOKEN, paste the token
Needed for book uploads. EPUB files are converted to PDF first, then processed by the same MinerU pipeline as PDFs.
- In your fork, go to Settings > Secrets and variables > Actions
- Click New repository secret, name it
VITE_SITE_PASSWORD, set your password - Re-deploy — visitors must now enter the password to access the site
Leave unset to keep the site public.
- Visit your site and click the gear icon in the top bar
- Enter a GitHub Personal Access Token with
reposcope (Create one here) - Upload a file:
.pdf— Converted to a multi-chapter book via MinerU API.epub— Converted to PDF with Calibre, then processed through the same chapter pipeline as PDFs.md— Rendered directly as a document.zip— Extracted as a static site (must containindex.html)
- Wait for GitHub Actions to process (progress shown in Actions tab)
- Your content appears on the homepage!
| Type | Upload | Display |
|---|---|---|
| Book | .pdf or .epub file |
Chapter reader with TOC sidebar, keyboard navigation |
| Document | .md file |
Single-page Markdown rendering with syntax highlighting |
| Site | .zip file |
Static site served directly (clicks open in new tab) |
- Reader — Dark/light theme, chapter sidebar, keyboard navigation, code highlighting (Shiki), math rendering (KaTeX), responsive layout
- Admin — Upload PDFs/EPUBs/Markdown/ZIPs from browser, catalog management (edit, publish, hide, archive, delete), search & filter
- Pipeline — GitHub Actions processes uploads automatically, handles large PDFs by auto-chunking
- Homepage — Tab-based filtering: All / Books / Documents / Sites
Upload content (browser → GitHub API → input/)
→ GitHub Actions runs scripts/process.py
→ .pdf: MinerU API → Markdown → Split chapters → docs/books/{id}/
→ .epub: Calibre → PDF → MinerU API → Markdown → Split chapters → docs/books/{id}/
→ .md: Copy to docs/articles/{id}/content.md
→ .zip: Extract to docs/sites/{id}/
→ Build manifest → GitHub Pages deploys
npm test # JS unit tests
npm run test:frontend # Frontend behavior tests
python -m unittest discover -s tests/scripts -v # Python pipeline testsDo I need to install anything locally? No. Everything runs in GitHub Actions and your browser.
Do I need to commit frontend build files? No. docs/index.html and docs/assets/ are generated in the Deploy to GitHub Pages workflow. Commit content data such as docs/books/, docs/articles/, docs/sites/, manifest.json, and catalog.json; Pages rebuilds the frontend bundle during deployment.
What if MinerU stops being free? Swap it by modifying scripts/mineru_client.py. Works with any PDF-to-Markdown tool.
Can I edit converted chapters? Yes. Books uploaded as either PDF or EPUB end up as generated Markdown chapters in docs/books/<id>/chapters/, which you can edit and commit.
Can I upload a static site? Yes. Package it as a .zip with index.html at the root and upload through the admin panel.
npx skills add Praeviso/GitShelfOnce installed, your agent can manage GitShelf content via natural language — upload files, list items, edit metadata, delete content, and check failures.
Add to your MCP client config (Claude Code, Cursor, etc.):
{
"mcpServers": {
"gitshelf": {
"command": "npx",
"args": ["-y", "@praeviso/gitshelf", "mcp"],
"env": {
"GITSHELF_TOKEN": "ghp_xxx",
"GITSHELF_REPO": "owner/repo"
}
}
}
}Provides tools to list content, read book chapters and articles, edit metadata, upload files, and delete items.
For personal study and research only. Users are responsible for ensuring they have the legal right to convert and host any content. Do not upload copyrighted material without permission. See full disclaimer in the LICENSE file.
MIT
thank to https://linux.do