Skip to content

Markdown SEO Check

Actions

About

Check markdown files
v1.1.6
Latest
Star (8)

Markdown SEO Check

Workflow Integration Test status Unit Test status Unit Test status Semantic Release bagde Semantic Release bagde

Validate markdown files with SEO best practices. Creates a pull request comment and fails if conditions are not met.

Table of Contents

Usage

The Action reads the changed files of a pull request through the GitHub API. It does not need actions/checkout. Do not check out the pull request head under pull_request_target: that runs untrusted code with a write token. Read more about the pull_request_target trigger here.

If your repo is public and you have pull requests from forks, pull_request_target is required, as this Action creates a comment on a Pull Request and therefore requires write permission. If your repo is private, you can use pull_request instead.

name: check

on: pull_request_target

permissions:
  contents: read
  pull-requests: write

jobs:
  seocheck:
    name: Markdown SEO Check
    runs-on: ubuntu-latest
    steps:
      - name: Markdown SEO Check
        uses: zentered/markdown-seo-check@v1.1.5
        with:
          max_title_length: 70
          max_description_length: 150
          max_slug_length: 100
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Inputs

Name Requirement Default Description
includes optional {*.md,*.mdx} Glob to include specific files or folders. See glob-to-regexp usage for examples.
excludes optional '' Glob to exclude files or folders
max_title_length required 70 Maximum length of page title
max_description_length required 150 Maximum length of description
max_slug_length required 100 Maximum length of slug

Outputs

screenshot of github comment

Contributing

See CONTRIBUTING.

License

See LICENSE.

Markdown SEO Check is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Check markdown files
v1.1.6
Latest

Markdown SEO Check is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.