{"id":14986068,"url":"https://github.com/baileyjm02/markdown-to-pdf","last_synced_at":"2025-04-09T10:05:04.365Z","repository":{"id":40889430,"uuid":"257699463","full_name":"BaileyJM02/markdown-to-pdf","owner":"BaileyJM02","description":"A GitHub Action to make PDF and HTML files from Markdown","archived":false,"fork":false,"pushed_at":"2025-03-28T22:24:53.000Z","size":155,"stargazers_count":146,"open_issues_count":26,"forks_count":35,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T10:04:49.849Z","etag":null,"topics":["github-actions","html","javascipt","javascript","markdown","nodejs","pdf"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaileyJM02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":"baileyjm02"}},"created_at":"2020-04-21T19:46:36.000Z","updated_at":"2025-03-31T21:09:17.000Z","dependencies_parsed_at":"2024-04-08T13:47:41.513Z","dependency_job_id":"882af132-1083-40fe-94dc-e71fe069c6ad","html_url":"https://github.com/BaileyJM02/markdown-to-pdf","commit_stats":{"total_commits":53,"total_committers":8,"mean_commits":6.625,"dds":"0.49056603773584906","last_synced_commit":"1be26775add5f94fb55d4a2ce36ff7cad23b8dd0"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaileyJM02%2Fmarkdown-to-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaileyJM02%2Fmarkdown-to-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaileyJM02%2Fmarkdown-to-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaileyJM02%2Fmarkdown-to-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaileyJM02","download_url":"https://codeload.github.com/BaileyJM02/markdown-to-pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018060,"owners_count":21034048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["github-actions","html","javascipt","javascript","markdown","nodejs","pdf"],"created_at":"2024-09-24T14:12:16.252Z","updated_at":"2025-04-09T10:05:04.326Z","avatar_url":"https://github.com/BaileyJM02.png","language":"CSS","funding_links":["https://github.com/sponsors/baileyjm02"],"categories":[],"sub_categories":[],"readme":"# Markdown to PDF\n[![CI](https://github.com/BaileyJM02/markdown-to-pdf/actions/workflows/main.yml/badge.svg)](https://github.com/BaileyJM02/markdown-to-pdf/actions/workflows/main.yml)\n\nCreates PDF and HTML files from Markdown using the GitHub (or custom) theme.\n\n## Notable Features:\n\n- Code highlighting\n- Tables\n- Images (see docs)\n- Internal and external links\n\n## GitHub Action Inputs\n\n### Input Path\n\n```yaml\nwith:\n  input_path: value\n```\n\n(**Required**)\n([Path](#path)) or ([File](#file))\nThe location of the folder containing your .md or .markdown files, or a path to a single .md or .markdown file that you would like to convert.\n\n*Note, previous versions of this action accepted the `input_dir` input. This is still accepted as input for backwards compatibility, but passing a directory as `input_path` now carries out the same functionality.\n\n### Images Directory\n\n```yaml\nwith:\n  images_dir: value\n```\n\n([Path](#path))\nThe location of the folder containing your images, this should be the route of all images. So of you had images located\nat `images/about/file.png` and `images/something-else/file.png` you would pass the value `images`.\n\n### Output Directory\n\n```yaml\nwith:\n  output_dir: value\n```\n\n([Path](#path))\nThe location of the folder you want to place the built files.\n\n### Image Import Prefix\n\n```yaml\nwith:\n  image_import: value\n```\n\n([String](#string))\nThe path you use to import your images that can be replaced with the server URL. For example if you\nhad `\u003cimg src=\"./images/something-else/file.\"\u003e` you would pass `./images` as this is replaced\nby `https://localhost:3000` during the build process.\n\n### Build HTML\n\n```yaml\nwith:\n  build_html: value\n```\n\n([Boolean](#boolean))\nWhether to also create a .html file.\n\n### Build PDF\n\n```yaml\nwith:\n  build_pdf: value\n```\n\n([Boolean](#boolean))\nWhether to also create a .pdf file (defaults to `true`. After all, this is the intended behaviour).\n\n### CSS Theme\n\n```yaml\nwith:\n  theme: value\n```\n\n([File](#file))\nThe location of the CSS file you want to use as the theme.\n\n```yaml\nwith:\n  extend_default_theme: value\n```\n\n([Boolean](#boolean))\nWhether to extend your custom CSS file with the default theme\n\n### Highlight CSS Theme\n\n```yaml\nwith:\n  highlight_theme: value\n```\n\n([File](#file))\nThe location of the CSS file you want to use as the code snipped highlight theme.\n\n### HTML/Mustache Template file\n\n```yaml\nwith:\n  template: value\n```\n\n([File](#file))\nThe location of the HTML/Mustache file you want to use as the HTML template.\n\n### Table Of Contents\n\n```yaml\nwith:\n  table_of_contents: value\n```\n\n([Boolean](#boolean))\nWhether a table of contents should be generated\n\n## Input Types\n\nA few pieces to describe what input each value expects.\n\n### Path\n\nA path will most likely be from your repository's route, it should not be prefixed or suffixed with a `/`. The path\nshould look like so `docs/topic/featureDocs` or `writing/category`.\n\n### String\n\nA string could be anything, and using `YAML` (or `YML`) does not need to be encased in quotes.\n\n### Boolean\n\nThis should be either `true` or `false`.\n\n### File\n\nThis should be the direct path to a file, it should not be prefixed with a `/`. An example: `styles/markdown-theme.css`.\n\n## Usage Examples\n\nAn example of a workflow for some documentation.\n\n````yml\n# .github/workflows/convert-to-pdf.yml\n\nname: Docs to PDF\n# This workflow is triggered on pushes to the repository.\non:\n  push:\n    branches:\n      - main\n    # Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory\n    paths:\n      - 'docs/**.md'\n      - 'docs/images/**'\n\njobs:\n  converttopdf:\n    name: Build PDF\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: baileyjm02/markdown-to-pdf@v1\n        with:\n          input_dir: docs\n          output_dir: pdfs\n          images_dir: docs/images\n          # for example \u003cimg src=\"./images/file-name.png\"\u003e\n          image_import: ./images\n          # Default is true, can set to false to only get PDF files\n          build_html: false\n      - uses: actions/upload-artifact@v3\n        with:\n          name: docs\n          path: pdfs\n\n````\n\n## Contributions\n\nAny contributions are helpful, please make a pull-request. If you would like to discuses a new feature, please create an\nissue first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaileyjm02%2Fmarkdown-to-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaileyjm02%2Fmarkdown-to-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaileyjm02%2Fmarkdown-to-pdf/lists"}