diff options
author | Flavio Castelli <fcastelli@suse.com> | 2021-04-19 18:58:15 +0200 |
---|---|---|
committer | Flavio Castelli <fcastelli@suse.com> | 2021-04-19 18:58:15 +0200 |
commit | 7aff98a8596bd7d52a54f7729f210b53566b9f8c (patch) | |
tree | 6cd45ab4123d0b7208069f903ca0c5cc5c5d9439 /src/config.rs | |
parent | bbf54d7459889697c74101bd0cd4f45f6c0d2ca0 (diff) |
Fix generation of edit links
The `IndexPreprocessor` rewrites the path for files
named `README.md` to be `index.md`. This breaks the edit link
in some circumstances.
To address this issues, the `Chapter` struct has now a new attribute
called `source_path`. This is initialized with the same value as
`path`, but is never ever changed.
Finally, the edit link is built by using the `source_path` rather
than the `path`.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 061a2499..e80e21c4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -559,6 +559,7 @@ impl Default for HtmlConfig { search: None, git_repository_url: None, git_repository_icon: None, + git_repository_edit_url_template: None, input_404: None, site_url: None, cname: None, |