mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-04 12:20:19 +03:00
docs: add markdownlint and some link checks alongside vale
This commit is contained in:
parent
76cecf054c
commit
b1adbe8c08
36
.github/workflows/docs-tests.yaml
vendored
Normal file
36
.github/workflows/docs-tests.yaml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: Documentation tests
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
markdownlint:
|
||||
name: markdownlint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: articulate/actions-markdownlint@v1
|
||||
with:
|
||||
config: .markdownlint.yaml
|
||||
files: 'README.md' 'docs/**/*.md'
|
||||
|
||||
vale:
|
||||
name: vale action
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: errata-ai/vale-action@reviewdog
|
||||
with:
|
||||
files: '["README.md", "docs"]'
|
||||
filter_mode: file
|
||||
version: 2.30.0
|
||||
|
||||
linkcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Markup Link Checker (mlc)
|
||||
uses: becheran/mlc@v0.16.1
|
||||
with:
|
||||
args: ./docs
|
16
.github/workflows/vale.yaml
vendored
16
.github/workflows/vale.yaml
vendored
|
@ -1,16 +0,0 @@
|
|||
name: Docs lint
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
vale:
|
||||
name: vale action
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: errata-ai/vale-action@reviewdog
|
||||
with:
|
||||
files: '["README.md", "docs"]'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
54
.markdownlint.yaml
Normal file
54
.markdownlint.yaml
Normal file
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
# Default rules: https://github.com/github/super-linter/blob/master/TEMPLATES/.markdown-lint.yml
|
||||
|
||||
# Rules by id
|
||||
|
||||
# Unordered list style
|
||||
MD004: false
|
||||
|
||||
# Unordered list indentation
|
||||
MD007:
|
||||
indent: 2
|
||||
|
||||
MD013:
|
||||
# TODO: Consider to decrease allowed line length
|
||||
line_length: 800
|
||||
tables: false
|
||||
|
||||
## Allow same headers in siblings
|
||||
MD024:
|
||||
siblings_only: true
|
||||
|
||||
# Multiple top level headings in the same document
|
||||
MD025:
|
||||
front_matter_title: ''
|
||||
|
||||
# Trailing punctuation in heading
|
||||
MD026:
|
||||
punctuation: '.,;:。,;:'
|
||||
|
||||
# Ordered list item prefix
|
||||
MD029: false
|
||||
|
||||
# Unordered lists inside of ordered lists
|
||||
MD030: false
|
||||
|
||||
# Inline HTML
|
||||
MD033: false
|
||||
|
||||
# No bare urls
|
||||
MD034: false
|
||||
|
||||
# Emphasis used instead of a heading
|
||||
MD036: false
|
||||
|
||||
# Disable "First line in file should be a top level heading"
|
||||
# We use uncommon format to add metadata.
|
||||
# TODO: Consider to use "YAML front matter".
|
||||
MD041: false
|
||||
|
||||
# Rules by tags
|
||||
blank_lines: false
|
||||
|
||||
MD046: false
|
||||
# code-block-style
|
|
@ -1,11 +1,11 @@
|
|||
<div align="center">
|
||||
<img alt="Redoc logo" src="https://raw.githubusercontent.com/Redocly/redoc/main//docs/images/redoc.png" width="400px" />
|
||||
|
||||
# Generate beautiful API documentation from OpenAPI
|
||||
# Generate beautiful API documentation from OpenAPI
|
||||
|
||||
[](https://www.npmjs.com/package/redoc) [](https://github.com/Redocly/redoc/blob/main/LICENSE)
|
||||
|
||||
[](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [](https://www.npmjs.com/package/redoc) [](https://www.jsdelivr.com/package/npm/redoc)
|
||||
[](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [](https://www.npmjs.com/package/redoc) [](https://www.jsdelivr.com/package/npm/redoc)
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ enter the URL for your definition and select **TRY IT**.
|
|||
- High-level grouping in side menu with the [`x-tagGroups`](https://redocly.com/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension
|
||||
- [Simple integration with `create-react-app`](https://redocly.com/docs/redoc/quickstart/react/)
|
||||
- Code samples support (with vendor extension) <br>
|
||||

|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -48,7 +48,7 @@ Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag,
|
|||
|
||||
If you have Node installed, quickly generate documentation using `npx`:
|
||||
|
||||
```
|
||||
```bash
|
||||
npx @redocly/cli build-docs openapi.yaml
|
||||
```
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Each deployment type has documentation on how to configure options for that type
|
|||
|
||||
**Versions: 2.x**
|
||||
|
||||
{% admonition type="success" name="Client-side configuration" %}
|
||||
{% admonition type="success" name="Client-side configuration" %}
|
||||
|
||||
Using Redoc as a standalone (HTML or React) tool, these options must be presented in [kebab case](https://en.wikipedia.org/wiki/Letter_case#Kebab_case).
|
||||
For example, `scrollYOffset` becomes `scroll-y-offset`, and `expandResponses` becomes `expand-responses`.
|
||||
|
|
Loading…
Reference in New Issue
Block a user