Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(docs): add gh actions for generating vimdocs #39

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

NStefan002
Copy link
Contributor

Explain the purpose and scope of your contribution.

Changes

  • add GitHub action for generating vim docs
  • since your README is very detailed, and your code comments not so much, I figured this is the right action for this project (it transforms the contents of the README to vimdoc format, enabling users to access it via :help smear-cursor.nvim.txt)
  • note: This is only a suggestion PR, if you don't like it or want me to add/change something let me know

Related GitHub issues and pull requests

@sphamba sphamba added the documentation Improvements or additions to documentation label Dec 4, 2024
@sphamba
Copy link
Owner

sphamba commented Dec 4, 2024

Nice! I was procrastinating learning how to automatically generate a doc for lua/neovim...
Do you know if there would be a way to

  • skip some of the Readme section (Demo, Contributing)
  • somehow a reference to config.lua?

Also, it would be great to have the workflow only run when the README.md file has changed, perhaps also on the dev branch.
Many thanks :)

@NStefan002
Copy link
Contributor Author

skip some of the Readme section (Demo, Contributing)

You can place the section inside panvimdoc-ignore-{start/end} block. See example [here].(https://github.com/kdheepak/panvimdoc/blob/main/doc/panvimdoc.md#markdown-only-content)

somehow a reference to config.lua

I don't know how to do this, but you can use <details> and <summary> and copy the config.lua file (or the important contents) to the readme.

Also, it would be great to have the workflow only run when the README.md file has changed

It only runs when the readme is changed, and if the date of the plugin's last update in the docs needs to be updated. For example, if your last commit was 3 days ago, and you push a new commit, the action will update the date in the vim docs (regardless of whether or or not you updated the readme)

... perhaps also on the dev branch

Do you want it to generate docs on both main and dev? I don't know your workflow but if you constantly merge dev into main then the action will update the docs once you merge the PR. Anyway, let me know if you want me to add docs gen on the dev branch.

@sphamba
Copy link
Owner

sphamba commented Dec 4, 2024

Okay, makes sense to only keep it executing on main if it gets updated there anyway then.
I'll still merge this to dev and temporarily enable the ci there to tests things on my side.
Thanks for your work!

@sphamba sphamba changed the base branch from main to dev December 4, 2024 22:46
@sphamba sphamba merged commit bf655c1 into sphamba:dev Dec 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add :h documentation
2 participants