Comments (12)
Hi, I'm getting exactly the same error from this action:
https://github.com/dcaddick/gsd_public/actions/runs/3937319131
Installing this Plugin is fine, no prob at all.
But once it reaches the "enablement" phase of adding the hook by reading the mkdocs.yml file
Copy of my config from this file here: https://github.com/dcaddick/gsd_public/blob/main/mkdocs.yml
Once enabled as below, it will fail every time, if I comment out the Plugin it'll work fine
Relevant snip:
# Plugins
plugins:
- search
- simple
#- git-authors:
# exclude:
# - index.md
- git-revision-date-localized
# type: timeago
# timezone: Europe/Amsterdam
# locale: en
# fallback_to_build_date: false
# enable_creation_date: true
#- glightbox
#- social
#- awesome-list
#- table-reader
#- img2fig
#- mermaid2
#- macros
#- minify
from mkdocs-git-revision-date-localized-plugin.
@dcaddick your issue is another one. From your link I could deduce you are using https://github.com/athackst/mkdocs-simple-plugin. Please see their documentation on how to properly install plugins. Secondly, mkdocs-simple-plugin
does not document which plugins are not supported. Because it copies all content to a /tmp
directory, but does not copy the .git
folder, all git-based plugins will not work. Please find more information in the issue: athackst/mkdocs-simple-plugin#466
@alelom I will need to setup a development environment on a windows machine to be able to try and reproduce the error. Not a high priority for me tbh..
from mkdocs-git-revision-date-localized-plugin.
Thanks Tim,
Any suggestions on a better alternative that does fully support the git elements?
Regards,
DaveC
from mkdocs-git-revision-date-localized-plugin.
That's a strange one indeed. I cannot reproduce, using python 3.10 and same versions of plugin and mkdocs/mkdocs-material.
Furthermore, I have a scheduled job so I can find any breaking changes in the dependencies, which hasn't been trigger. I retriggered the builds on master branch, but they are succeeding.
Windows support is always tricky though. My first thought was encoding, as windows uses different encodings for line ending (\r\n
vs \n
, see link).
Did you copy/paste those options from somewhere? Can you try manually typing them in your editor and then saving them? Or, you can use your editor to enforce consistent line endings.
The second thing I can think of is this has something to do with mkdocs 1.4, that introduced some changes around the configuration. Can you try again with pip install mkdocs==1.3.1
? If that works, I know where to start digging!
from mkdocs-git-revision-date-localized-plugin.
Had a chance to look at the suggestions yet?
from mkdocs-git-revision-date-localized-plugin.
Did you copy/paste those options from somewhere? Can you try manually typing them in your editor and then saving them? Or, you can use your editor to enforce consistent line endings.
Did them manually, and tried several combinations. It's not a line endings issue I believe
The second thing I can think of is this has something to do with mkdocs 1.4, that introduced some changes around the configuration. Can you try again with pip install mkdocs==1.3.1
trying that asap.
from mkdocs-git-revision-date-localized-plugin.
Build fails also on mkdocs v1.3.1 with same modality explained in the post.
from mkdocs-git-revision-date-localized-plugin.
Ok one more idea. I noticed you haven't defined any other options in any other plugins. It might be indentation.
Can you indent with one tab? Or try four spaces?
Can you try specifying any option of any other plugin (to confirm the problem is with this plugin). For example https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin#options
I noticed that in the mkdocs of this repo I used double spaces for my options, maybe that doesn't work well in windows.
from mkdocs-git-revision-date-localized-plugin.
Hi, thanks for the messages. I did try with different indentations. I also have tried it in isolation and with other plugins that have options set. I will leave you my full yml
config file, maybe you will spot if I'm doing anything wrong:
site_name: BHoM documentation
copyright: Copyright © 2018 - 2022 BHoM
site_url: https://bhom.xyz/documentation/
repo_url: https://github.com/BHoM/documentation
edit_uri: edit/main/docs/
theme:
name: material
logo: _images/logos/logo.png
favicon: _images/logos/favicon.ico
palette:
primary: white
accent: pink
features:
- navigation.tracking
- navigation.top
plugins:
- search
- awesome-pages # allows to customise the ordering of pages.
- git-revision-date-localized: # Displays date created/modified on the page. The below configurations are bugged, so only date modified works.
#enable_creation_date: true
markdown_extensions:
- attr_list # allows to add HTML/CSS attributes to almost every Markdown element, useful for e.g. aligning an image to the left/right (can't do centre though! use md_in_html instead)
- md_in_html # allows to add markdown within HTML elements, useful for e.g. adding image captions or centering an image
- pymdownx.betterem # Wider support to markdown symbols
# Code syntax highlighting
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
# Mathjax support
- pymdownx.arithmatex:
generic: true
# Call-outs and note boxes ('admonition')
- admonition
- pymdownx.details
- pymdownx.superfences
extra_javascript:
# Also required for Mathjax support
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/BHoM
name: BHoM on Github
from mkdocs-git-revision-date-localized-plugin.
Thanks @timvink, that's understandable. I will update you in case I find something else. For example, since you are suggesting that this is an OS-specific issue, I will try and set the configuration to include these settings and see if at least the github actions are still able to run it correctly, given they run on Linux.
from mkdocs-git-revision-date-localized-plugin.
Here is how I have my portion of mkdocs.yml
set and it works for me...
- git-revision-date-localized:
type: timeago
locale: en
enable_creation_date: true
fallback_to_build_date: true
This is in a local build so the dates show the same
from mkdocs-git-revision-date-localized-plugin.
Closing the issue as I can't reproduce
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
- 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.