Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[ BUG ] Wrong filename in Github Action (the trailing ".md" should be removed)

Open
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, markdown, shell
Domain
ci-cd, tooling

Research direction

Start with the gh-md-toc script downloaded and invoked by the workflow, using the reported server.md example as the reproduction. Check how links are generated for headings in wiki files and verify that the output uses only the heading anchor, without the .md filename, while remaining suitable for the generated site.

Written by the indexing model from the issue text.

Description

bug

To start with: thank you for this great Markdown enhancement!

Describe the bug
I added a github action in the graphql-maven-plugin-project'wiki.
The issue is that the URL in the generated TOC doesn't work.

You can check on this file

https://github.com/graphql-java-generator/graphql-maven-plugin-project/wiki/server.md#graphql-maven-plugin-server-mode-usage

Expected behavior

The generated link is:

   * [GraphQL Maven Plugin (server mode usage)](server.md#graphql-maven-plugin-server-mode-usage)

But it should be:

   * [GraphQL Maven Plugin (server mode usage)](#graphql-maven-plugin-server-mode-usage)

Without the filename at all. This insures that the link will work:

  • In the github wiki (where the URL is https://github.com/graphql-java-generator/graphql-maven-plugin-project/wiki/server)
  • In the site generated by maven (where the URL is https://graphql-maven-plugin-project.graphql-java-generator.com/server.html)
    • The filename ends with .html here

Perhaps there is a parameter to manage that, but I did not find it.

Environment (please complete the following information):
I'm execution the github action with this action file:

# This is a basic workflow to help you get started with Actions

name: Wiki TOC

# Controls when the action will run. 
on:
  # Triggers the workflow on any change on the wiki (on the master branch)
  #gollum:    # This is triggered each time a file is changed on the wiki, including when the this script automatically run!
  
  # Below: push on the wiki, for the master branch 
  #push:
  #  paths:
  #    - 'wiki/**'
  #  branches:
  #    - master

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "toc"
  toc:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: actions/checkout@v2
        with:
          repository: ${{github.repository}}.wiki
      - run: |
          ls
          curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
          chmod a+x gh-md-toc
          ./gh-md-toc --insert --no-backup *.md
      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Auto update markdown TOC
Dominant language
Shell
Stars
3.3k
Forks
2.7k
Avg merge
20m
Merged PRs (30d)
7

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ekalinin/github-markdown-toc

All issues in ekalinin/github-markdown-toc

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.