timvink / mkdocs-git-authors-plugin

MkDocs plugin to display git authors of a page.
https://timvink.github.io/mkdocs-git-authors-plugin
MIT License
68 stars 17 forks source link

Md has not been committed yet. Lines are not counted ? #69

Open dcaddick opened 1 year ago

dcaddick commented 1 year ago

Hi Tim,

Apologies for a n00b question, but I've not been able to figure this issue out and I'm assuming it's something dumb that I have done?

WARNING - [git-authors-plugin] /tmp/mkdocs_simple_8fyj62vv/MDE.md has not been committed yet. Lines are not counted

image

Have I missed something in the docs, as this is simply being published to GitHub pages via an Action

timvink commented 1 year ago

GitHub actions only uses a clone depth of 1. Can you try the suggestions mentioned here:

https://github.com/timvink/mkdocs-git-authors-plugin#note-when-using-build-environments?

dcaddick commented 1 year ago

Thanks Tim,

Sorry - should have mentioned that - I have added this to my settings: github actions: set fetch_depth to 0

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
timvink commented 1 year ago

You're using checkout v2, can you try v3 (see here: https://github.com/actions/checkout)

But, I noticed in the screenshot that you are using the /tmp directory. The 'mkdocs_simple' thing might mean you are using mkdocs-simple-plugin ? That plugin actually does not support any plugins that use information from git, because the .git folder is not copied to the /tmp folder.

For more info, see: https://github.com/athackst/mkdocs-simple-plugin/issues/466

dcaddick commented 1 year ago

Thanks Tim,

That makes sense & appreciate the reply on the other thread now that I understand the .git info is not coming thru.

I'll try the checkoutv3 and reply here.

dcaddick commented 1 year ago

You're using checkout v2, can you try v3 (see here: https://github.com/actions/checkout)

But, I noticed in the screenshot that you are using the /tmp directory. The 'mkdocs_simple' thing might mean you are using mkdocs-simple-plugin ? That plugin actually does not support any plugins that use information from git, because the .git folder is not copied to the /tmp folder.

For more info, see: athackst/mkdocs-simple-plugin#466

That being the case - any advice on suggested replacement that would be more reliable on bringing thru the git info?

starhound commented 1 year ago

Having this exact issue with mkdocs build when the docs dir is a submodule.

WARNING  -  [git-authors-plugin] /home/starhound/doctrina/docs/AinSoph/System Functions/Efuns/rmember.md has not been committed yet. Lines are not counted
WARNING  -  [git-authors-plugin] /home/starhound/doctrina/docs/AinSoph/System Functions/Efuns/rusage.md has not been committed yet. Lines are not counted
WARNING  -  [git-authors-plugin] /home/starhound/doctrina/docs/AinSoph/System Functions/Efuns/save_object.md has not been committed yet. Lines are not counted
WARNING  -  [git-authors-plugin] /home/starhound/doctrina/docs/AinSoph/System Functions/Efuns/save_value.md has not been committed yet. Lines are not counted
WARNING  -  [git-authors-plugin] /home/starhound/doctrina/docs/AinSoph/System Functions/Efuns/say.md has not been committed yet. Lines are not counted
timvink commented 1 year ago

@starhound that's related to this issue: https://github.com/timvink/mkdocs-git-authors-plugin/issues/43 , which is still open. Having small kids means a lot less this for open source hobby work -- I'm open to PRs though :)

SilentGlasses commented 1 year ago

I have the same issues but I do not use actions, I use cirecleci.

alexeych0 commented 5 months ago

Is there a way to disable these logs?