Comments (5)
Indeed! Ahh that makes sense. Thanks!
from mkdocs-git-revision-date-localized-plugin.
Hi @connerxyz , thanks for posting a bug report!
Can you try upgrading to the latest version first? pip install --upgrade mkdocs-git-revision-date-localized-plugin
If that doesn't solve it, some additional questions:
- which OS are you running? Which version of python (
python -V
) - Does running
git rev-list --count HEAD
work for you (to see if you have a problem with git`) - Do you specificy any plugin options other than the defaults?
- Which version of mkdocs are you using? run
mkdocs -V
- Are you using any other plugins? Can you try disabling all others? Can you paste your
mkdocs.yml
file?
from mkdocs-git-revision-date-localized-plugin.
Tried it with 0.8 with similar result.
[Container] 2021/01/07 20:56:27 Running command poetry run mkdocs build
--
325 | INFO - Cleaning site directory
326 | INFO - Building documentation to directory: /codebuild/output/src393512817/src/github.com/tr/hx-site/site
327 | ERROR - [git-revision-date-localized-plugin] Unable to read git logs of '/codebuild/output/src393512817/src/github.com/tr/hx-site/docs/index.md'. To ignore this error, set option 'fallback_to_build_date: true'
328 | ERROR - Error reading page 'index.md': Cmd('git') failed due to: exit code(128)
329 | cmdline: git for-each-ref
330 | stderr: 'fatal: missing object d779ac054d402a59f34593fadb9e2102734144ae for refs/pull/3/head'
331 | Traceback (most recent call last):
332 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/bin/mkdocs", line 8, in <module>
333 | sys.exit(cli())
334 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
335 | return self.main(*args, **kwargs)
336 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/click/core.py", line 782, in main
337 | rv = self.invoke(ctx)
338 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
339 | return _process_result(sub_ctx.command.invoke(sub_ctx))
340 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
341 | return ctx.invoke(self.callback, **ctx.params)
342 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
343 | return callback(*args, **kwargs)
344 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs/__main__.py", line 152, in build_command
345 | build.build(config.load_config(**kwargs), dirty=not clean)
346 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs/commands/build.py", line 271, in build
347 | _populate_page(file.page, config, files, dirty)
348 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs/commands/build.py", line 167, in _populate_page
349 | page.markdown = config['plugins'].run_event(
350 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs/plugins.py", line 94, in run_event
351 | result = method(item, **kwargs)
352 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs_git_revision_date_localized_plugin/plugin.py", line 150, in on_page_markdown
353 | revision_dates = self.util.get_revision_date_for_file(
354 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs_git_revision_date_localized_plugin/util.py", line 135, in get_revision_date_for_file
355 | raise err
356 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs_git_revision_date_localized_plugin/util.py", line 107, in get_revision_date_for_file
357 | unix_timestamp = self._get_repo(realpath).log(
358 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs_git_revision_date_localized_plugin/util.py", line 43, in _get_repo
359 | raise_ci_warnings(self.repo_cache[path])
360 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs_git_revision_date_localized_plugin/ci.py", line 21, in raise_ci_warnings
361 | n_commits = commit_count(repo)
362 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/mkdocs_git_revision_date_localized_plugin/ci.py", line 87, in commit_count
363 | refs = repo.for_each_ref().split("\n")
364 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/git/cmd.py", line 542, in <lambda>
365 | return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
366 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/git/cmd.py", line 1006, in _call_process
367 | return self.execute(call, **exec_kwargs)
368 | File "/codebuild/output/src393512817/src/github.com/tr/hx-site/.venv/lib/python3.8/site-packages/git/cmd.py", line 823, in execute
369 | raise GitCommandError(command, status, stderr_value, stdout_value)
370 | git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
371 | cmdline: git for-each-ref
372 | stderr: 'fatal: missing object d779ac054d402a59f34593fadb9e2102734144ae for refs/pull/3/head'
from mkdocs-git-revision-date-localized-plugin.
which OS are you running?
aws/codebuild/amazonlinux2-x86_64-standard:3.0
Which version of python (python -V)
3.8
Does running git rev-list --count HEAD work for you (to see if you have a problem with git`)
Doesn't seem to output anything.
Do you specificy any plugin options other than the defaults?
- git-revision-date-localized: # https://squidfunk.github.io/mkdocs-material/plugins/revision-date/
type: timeago
Which version of mkdocs are you using? run mkdocs -V
mkdocs (1.1.2)
Are you using any other plugins? Can you try disabling all others? Can you paste your mkdocs.yml file?
plugins: # https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins
- search: # https://squidfunk.github.io/mkdocs-material/plugins/search/
lang: en
separator: '[\s\-\.]+'
prebuild_index: true
- minify: # https://squidfunk.github.io/mkdocs-material/plugins/minification/
minify_html: true
- git-revision-date-localized: # https://squidfunk.github.io/mkdocs-material/plugins/revision-date/
type: timeago
- awesome-pages # https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin , https://squidfunk.github.io/mkdocs-material/plugins/awesome-pages/
#- tags https://github.com/jldiaz/mkdocs-plugin-tags
from mkdocs-git-revision-date-localized-plugin.
which OS are you running?
aws/codebuild/amazonlinux2-x86_64-standard:3.0
Are you using AWS codebuild to build your docs? The problem with many build systems is that they do what's called a shallow git clone, meaning to speed up builds they do not retrieve the full git history. This plugin for every page looks at every line, and determines the date of the corresponding commit that touched that line, in order to determine when the page was last updated. See https://github.com/timvink/mkdocs-git-revision-date-localized-plugin#note-when-using-build-environments
This might also be the reason you are getting an error. I am not familiar with AWS codebuild, but you can try setting a very high value for git clone depth, or choose to do a full clone: https://docs.aws.amazon.com/codebuild/latest/userguide/run-build-console.html
from mkdocs-git-revision-date-localized-plugin.
Related Issues (20)
- Edited and Created time become same when publishing with github pages HOT 7
- ``InvalidGitRepositoryError`` during build when including auto-generated files HOT 8
- Unable to set any configurations HOT 12
- Typo in variable names HOT 2
- The plugin breaks with the last mkdocs docker image HOT 3
- The plugin breaks with squidfunk/mkdocs-material:9.0.3 HOT 1
- Is there a way to turn off warnings? HOT 4
- Improve error message for dubious git ownership HOT 2
- if a file has no git logs, use the last modified timestamp instead of the current HOT 4
- which themes will this plugin work?
- Feature request: exclude specific commits when calculating the 'last update' calculation HOT 3
- Poor performance on large monorepos HOT 3
- Timeago setting results in incorrect items being added to extra_javascript HOT 2
- Create date not correct on Github pages HOT 4
- Document how to use sparse checkouts
- correctly populate `lastmod` of `sitemap.xml` HOT 2
- DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version HOT 1
- Cloudflare Pages fetch-depth HOT 6
- 1.2.3 breaks integration with Material for MkDocs HOT 5
- Whitelist / Negate certain excludes with a `!`? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-git-revision-date-localized-plugin.