Skip to content

Commit

Permalink
update to v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
timvink authored Oct 22, 2024
1 parent 1e69247 commit 2e7646e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ You can customize the plugin by setting options in `mkdocs.yml`. For example:
enable_creation_date: true
exclude:
- index.md
enable_git_follow: true
enabled: true
strict: true
```
Expand Down Expand Up @@ -114,6 +115,13 @@ Default is empty. Specify a list of page source paths (one per line) that should
- folder/*
```

## `enable_git_follow`

Default is `true`. When enabled it will use `git log --follow` to find the git history. This means git will follow changes if you rename or move the file also.
Despite being a sensible default, there is a known bug with `--follow`: if you have committed an empty version of a file, then `git log --follow` can follow the wrong trail and give wrong results (see [this blogpost](https://blog.plover.com/prog/git-log-follow.html)).

When disabled (by setting it to `false`), each file's history will only consist of its current name and path, it's history from the previous paths or names will not be included.

## `enabled`

Default is `true`. Enables you to deactivate this plugin. A possible use case is local development where you might want faster build times and/or do not have git available. It's recommended to use this option with an environment variable together with a default fallback (introduced in `mkdocs` v1.2.1, see [docs](https://www.mkdocs.org/user-guide/configuration/#environment-variables)). Example:
Expand All @@ -133,14 +141,6 @@ export ENABLED_GIT_REVISION_DATE=false
mkdocs serve
```

## `enable_git_follow`

Default is `true`. When enabled it will issue `--follow` option for git history tracing; meaning it will also track file's previous history for rename and move operations.

When disabled (by setting it to `false`), each file's history will only consist of its current name and path, it's history from the previous paths or names will not be included.

When enabled (by setting it to `true`), history tracking with `--follow` will be enabled and history will include the file's history from rename and other paths.

## `strict`

Default is `true`. When enabled, the logs will show warnings when something is wrong but a fallback has been used. When disabled, the logger will use the INFO level instead.
Expand Down
2 changes: 1 addition & 1 deletion src/mkdocs_git_revision_date_localized_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.9"
__version__ = "1.3.0"

0 comments on commit 2e7646e

Please sign in to comment.