Skip to content

if-nil/docsify-file-catalog-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages