{"id":33171977,"url":"https://github.com/kernoeb/docker-docsify-pdf","last_synced_at":"2026-01-31T06:39:32.317Z","repository":{"id":38973972,"uuid":"461337512","full_name":"kernoeb/docker-docsify-pdf","owner":"kernoeb","description":"Docker way to convert Docsify pages to PDF (with Puppeteer)","archived":false,"fork":false,"pushed_at":"2025-11-17T14:58:20.000Z","size":2327,"stargazers_count":35,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-17T16:27:11.967Z","etag":null,"topics":["docker","docsify","markdown","pdf","table-of-contents","toc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kernoeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-19T23:24:56.000Z","updated_at":"2025-11-17T14:58:24.000Z","dependencies_parsed_at":"2024-10-16T15:51:42.479Z","dependency_job_id":"27117db6-b735-40ae-b148-4d6ee24339d8","html_url":"https://github.com/kernoeb/docker-docsify-pdf","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/kernoeb/docker-docsify-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernoeb%2Fdocker-docsify-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernoeb%2Fdocker-docsify-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernoeb%2Fdocker-docsify-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernoeb%2Fdocker-docsify-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kernoeb","download_url":"https://codeload.github.com/kernoeb/docker-docsify-pdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernoeb%2Fdocker-docsify-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28931402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docsify","markdown","pdf","table-of-contents","toc"],"created_at":"2025-11-16T02:00:19.608Z","updated_at":"2026-01-31T06:39:32.310Z","avatar_url":"https://github.com/kernoeb.png","language":"JavaScript","readme":"# Docker Docsify PDF\n\n![Workflow](https://github.com/kernoeb/docker-docsify-pdf/actions/workflows/docker-publish.yml/badge.svg)\n\nThis project is based on [meff34/docsify-to-pdf-converter](https://github.com/meff34/docsify-to-pdf-converter/) repository.\n\n## Features\n\n- Custom **icons**\n- **Codeblocks**\n- **Table of contents** (auto-generated)\n- **Multilingual** support (multiple sidebars)\n- PDF **cover** page\n- **PlantUML** (.puml) diagrams\n- **SVG** support\n\n\u003e All improvements and fixes from original repository are [here](#differences-from-original-repository).\n\n## Screenshots\n\n![Screenshot 1](img/capture1.png)\n\n![Screenshot 2](img/capture2.png)\n\n![img.png](img/capture3.png)\n\n## Usage\n\nFirst, create a documentation in a `docs` directory (like the repository example).\nYou need a `_sidebar.md`[^1].\n\n**Pull the image** and create output directory :\n```bash\ndocker pull ghcr.io/kernoeb/docker-docsify-pdf:latest\nmkdir -p $(pwd)/pdf\n```\n\n**Run the container** (volumes are mandatory) :\n```bash\ndocker run --rm -it \\\n  --cap-add=SYS_ADMIN \\\n  --user $(id -u):$(id -g) \\\n  -v $(pwd)/docs:/home/node/docs:ro \\\n  -v $(pwd)/pdf:/home/node/pdf:rw \\\n  -v $(pwd)/resources/covers/cover.pdf:/home/node/resources/cover.pdf:ro \\\n  -e \"PDF_OUTPUT_NAME=DOCUMENTATION.pdf\" \\\n  ghcr.io/kernoeb/docker-docsify-pdf:latest\n```\n\nAnd voilà ! :tada:\n\n---\n\nYou can use [zx](https://github.com/google/zx) to generate the PDF in one command : `zx README.md`.\n\nYou can also add custom js files _(plugins)_ :\n\n```bash\n-v $(pwd)/resources/js/thing.js:/home/node/resources/js/thing.js:ro\n```\n\n\u003e All the **resources** can be **replaced** (images, css, js, ...) as well\n\u003e It can be useful if you want to change the **CSS theme**\n\nThe PDF **cover** is **optional** : just remove the mapping on the command.\n\n## Differences from original repository\n\n- Fix :\n  - Slugify / internal **URL** (some URLs were not properly encoded)\n  - `localhost` links are now disabled\n  - **Codeblocks** (some code blocks were sliced)\n  - Better margins in the final PDF\n  - Page breaks between sections\n  - If an image was used multiple times in the same section, it was not working\n- Security / performance :\n  - Update dependencies (Puppeteer, Docsify, ...)\n  - Docker container is running with **current user** rights (optional)\n- Feats :\n  - **Table of content** (based on sidebar)\n  - Custom **cover** PDF page\n  - **Docker** way to generate PDF\n  - Highlight code blocks (with PrismJS)\n  - **Multilingual** support\n  - Font Awesome icons support, example : `{{fa cog}}`\n  - PlantUML diagrams support (see the example in docs directory)\n  - SVG support\n- Chore :\n  - Clean code with standard ESLint\n  - Remove useless stuff\n\n## Troubleshooting\n\nThe order (**alphabetical**) of JavaScript files is important for some libraries like [Docsify-Latex](https://scruel.github.io/docsify-latex/#/).\n\n\u003e From Docsify-Latex documentation : \"You should put docsify-latex plugin script below docsify and display engine scripts, because plugin script depends on them.\"\n\n---\n\nIf you have this error : `System limit for number of file watchers reached` or `Error: EMFILE: too many open files` :\n\n```\necho fs.inotify.max_user_watches=1048576 | sudo tee -a /etc/sysctl.conf \u0026\u0026 sudo sysctl --system\necho fs.inotify.max_user_instances=512 | sudo tee -a /etc/sysctl.conf \u0026\u0026 sudo sysctl --system\n```\ncf. [StackOverflow](https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached)\n\n---\n\n[^1]: To change `_sidebar.md` location _(e.g for multi-language support)_, add `-v $(pwd)/docs/de/_sidebar.md:/home/node/docs/_sidebar.md:ro` to the command\n","funding_links":[],"categories":["Community Resources"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernoeb%2Fdocker-docsify-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkernoeb%2Fdocker-docsify-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernoeb%2Fdocker-docsify-pdf/lists"}