All Projects → BaileyJM02 → markdown-to-pdf

BaileyJM02 / markdown-to-pdf

Licence: MIT License
A GitHub Action to make PDF and HTML files from Markdown

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
HTML
75241 projects

Projects that are alternatives of or similar to markdown-to-pdf

drupal9ci
One-line installers for implementing Continuous Integration in Drupal 9
Stars: ✭ 137 (+315.15%)
Mutual labels:  github-actions
ghaction-import-gpg
GitHub Action to easily import a GPG key
Stars: ✭ 161 (+387.88%)
Mutual labels:  github-actions
redis-github-action
Use Redis in GitHub Actions
Stars: ✭ 56 (+69.7%)
Mutual labels:  github-actions
action-autotag
Automatically generate a new tag when the manifest file (package.json, Dockerfile, custom file, etc) version changes.
Stars: ✭ 45 (+36.36%)
Mutual labels:  github-actions
cuda-toolkit
GitHub Action to install CUDA
Stars: ✭ 34 (+3.03%)
Mutual labels:  github-actions
ghaction-upx
GitHub Action for UPX, the Ultimate Packer for eXecutables
Stars: ✭ 27 (-18.18%)
Mutual labels:  github-actions
bake-action
GitHub Action to use Docker Buildx Bake as a high-level build command
Stars: ✭ 52 (+57.58%)
Mutual labels:  github-actions
jcefbuild
Binary builds of java-cef
Stars: ✭ 160 (+384.85%)
Mutual labels:  github-actions
Setup-Nuget
Set up your GitHub Actions workflow with the latest version of Nuget.exe CLI tool
Stars: ✭ 27 (-18.18%)
Mutual labels:  github-actions
commit-comment
A GitHub action to create a comment for a commit on GitHub
Stars: ✭ 62 (+87.88%)
Mutual labels:  github-actions
megalinter
🦙 Mega-Linter analyzes 48 languages, 22 formats, 19 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
Stars: ✭ 534 (+1518.18%)
Mutual labels:  github-actions
autoSubmit
北京大学疫情出入校自动填报
Stars: ✭ 47 (+42.42%)
Mutual labels:  github-actions
release-notify-action
GitHub Action that triggers e-mails with release notes when these are created
Stars: ✭ 64 (+93.94%)
Mutual labels:  github-actions
github-actions-templates
Starter GitHub Actions templates to get you up and running with community built integrations
Stars: ✭ 44 (+33.33%)
Mutual labels:  github-actions
sentry
GitHub Actions for interacting with Sentry.io
Stars: ✭ 14 (-57.58%)
Mutual labels:  github-actions
helm-gh-pages
A GitHub Action for publishing Helm charts to Github Pages
Stars: ✭ 60 (+81.82%)
Mutual labels:  github-actions
autoupdate
A GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch.
Stars: ✭ 70 (+112.12%)
Mutual labels:  github-actions
latex-action
GitHub Action to compile LaTeX documents
Stars: ✭ 123 (+272.73%)
Mutual labels:  github-actions
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+239.39%)
Mutual labels:  github-actions
Github-Actions-React-Native
Github Action for React Native Build 🦊
Stars: ✭ 99 (+200%)
Mutual labels:  github-actions

Markdown to PDF

CI

Creates PDF and HTML files from Markdown using the GitHub (or custom) theme.

Notable Features:

  • Code highlighting
  • Tables
  • Images (see docs)
  • Internal and external links

GitHub Action Inputs

Input Directory

with:
  input_dir: value

(Required) (Path) The location of the folder containing your .md or .markdown files.

Images Directory

with:
  images_dir: value

(Path) The location of the folder containing your images, this should be the route of all images. So of you had images located at images/about/file.png and images/something-else/file.png you would pass the value images.

Output Directory

with:
  output_dir: value

(Path) The location of the folder you want to place the built files.

Image Import Prefix

with:
  image_import: value

(String) The path you use to import your images that can be replaced with the server URL. For example if you had <img src="./images/something-else/file."> you would pass ./images as this is replaced by https://localhost:3000 during the build process.

Build HTML

with:
  build_html: value

(Boolean) Whether to also create a .html file.

CSS Theme

with:
  theme: value

(File) The location of the CSS file you want to use as the theme.

with:
  extend_default_theme: value

(Boolean) Whether to extend your custom CSS file with the default theme

Highlight CSS Theme

with:
  highlight_theme: value

(File) The location of the CSS file you want to use as the code snipped highlight theme.

HTML/Mustache Template file

with:
  template: value

(File) The location of the HTML/Mustache file you want to use as the HTML template.

Table Of Contents

with:
  table_of_contents: value

(Boolean) Whether a table of contents should be generated

Input Types

A few pieces to describe what input each value expects.

Path

A path will most likely be from your repository's route, it should not be prefixed or suffixed with a /. The path should look like so docs/topic/featureDocs or writing/category.

String

A string could be anything, and using YAML (or YML) does not need to be encased in quotes.

Boolean

This should be either true or false.

File

This should be the direct path to a file, it should not be prefixed with a /. An example: styles/markdown-theme.css.

Usage Examples

An example of a workflow for some documentation.

# .github/workflows/convert-to-pdf.yml

name: Docs to PDF
# This workflow is triggered on pushes to the repository.
on:
  push:
    branches:
      - master
    # Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory
    paths:
      - 'docs/**.md'
      - 'docs/images/**'

jobs:
  converttopdf:
    name: Build PDF
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: baileyjm02/markdown-to-pdf@v1
        with:
          input_dir: docs
          output_dir: pdfs
          images_dir: docs/images
          # for example <img src="./images/file-name.png">
          image_import: ./images
          # Default is true, can set to false to only get PDF files
          build_html: false
      - uses: actions/upload-artifact@v1
        with:
          name: docs
          path: pdfs

Contributions

Any contributions are helpful, please make a pull-request. If you would like to discuses a new feature, please create an issue first.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].