Skip to content

Commit 36b2159

Browse files
committed
chore: rename option, add documentation
1 parent f848ea1 commit 36b2159

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

docs/options.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ export ENABLED_GIT_REVISION_DATE=false
133133
mkdocs serve
134134
```
135135

136+
## `enable_git_follow`
137+
138+
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.
139+
140+
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.
141+
142+
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.
143+
136144
## `strict`
137145

138146
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.

src/mkdocs_git_revision_date_localized_plugin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class GitRevisionDateLocalizedPlugin(BasePlugin):
4343
("enable_creation_date", config_options.Type(bool, default=False)),
4444
("enabled", config_options.Type(bool, default=True)),
4545
("strict", config_options.Type(bool, default=True)),
46-
("version_history_follow_enabled", config_options.Type(bool, default=True))
46+
("enable_git_follow", config_options.Type(bool, default=True))
4747
)
4848

4949
def on_config(self, config: config_options.Config, **kwargs) -> Dict[str, Any]:

src/mkdocs_git_revision_date_localized_plugin/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def get_git_commit_timestamp(
8080
realpath = os.path.realpath(path)
8181
git = self._get_repo(realpath)
8282

83-
follow_option=self.config.get('version_history_follow_enabled')
83+
follow_option=self.config.get('enable_git_follow')
8484

8585
if is_first_commit:
8686
# diff_filter="A" will select the commit that created the file

0 commit comments

Comments
 (0)