Skip to content

docsify-file-catalog-action

Actions
generate _sidebar.md to show the file catalog
v1.1
Latest
Star (2)

docsify-file-catalog-action

This repository is a github action, which is used to generate a _sidebar.md file based on the repository's file directory, which can be used to display a sidebar in Docsify with docsify-sidebar-collapse plugin.

This Action will use the GITHUB_TOKEN to add a pull commit, so the GITHUB_TOKEN requires write access, which can be set in the repository's setting

Usage

Example Workflow file

on: [push]

jobs:
  add_sidebar_job:
    runs-on: ubuntu-latest
    name: job to add _sidebar.md
    steps:
      - uses: actions/checkout@v4
      - uses: if-nil/docsify-file-catalog-action@main
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          # include: '.*'
inputs description required default
github_token Used to add _sidebar.md to the repository, requires write access. true null
include Files what you want the directory to contain. Use regular expressions. false .*\.md

Example

You can see the usage inside this repository actions-demo

- [README.md](./README.md)
- directory1
  - [file1.1.md](./directory1/file1.1.md)
  - [file1.md](./directory1/file1.md)
- directory2
  - [file2.md](./directory2/file2.md)
- directory3
  - [file3.md](./directory3/file3.md)
- [_sidebar.md](./_sidebar.md)

contents of the _sidebar.md

docsify-file-catalog-action 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

generate _sidebar.md to show the file catalog
v1.1
Latest

docsify-file-catalog-action 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.