This is an automated email from the ASF dual-hosted git repository.
niallp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/attic.git
The following commit(s) were added to refs/heads/main by this push:
new 43f8b14 Remove the JustForDocs standard "Edit this page" link and add
custom version in footer_custom.html that caters for the generated pages
43f8b14 is described below
commit 43f8b1483bd5aa77f50b52d695b7d55e98e09c74
Author: Niall Pemberton <[email protected]>
AuthorDate: Mon May 5 13:41:19 2025 +0100
Remove the JustForDocs standard "Edit this page" link and add custom
version in footer_custom.html that caters for the generated pages
---
_config.yml | 6 ------
_includes/footer_custom.html | 9 +++++++++
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/_config.yml b/_config.yml
index 6078fc3..fafeccd 100644
--- a/_config.yml
+++ b/_config.yml
@@ -52,12 +52,6 @@ nav_external_links:
url: https://events.apache.org/
opens_in_new_tab: true
hide_icon: true
-# Footer "Edit this page on GitHub" link text
-gh_edit_link: true # show or hide edit this page link
-gh_edit_link_text: "Improve this page"
-gh_edit_repository: "https://github.com/apache/attic" # the github URL for
your repo
-gh_edit_branch: "main" # the branch that your docs is served from
-gh_edit_view_mode: "edit" # "tree" or "edit" if you want the user to jump into
the editor immediately
# For Callouts, see
https://just-the-docs.github.io/just-the-docs/docs/configuration/#callouts
callouts:
diff --git a/_includes/footer_custom.html b/_includes/footer_custom.html
index d3c426e..cb79763 100644
--- a/_includes/footer_custom.html
+++ b/_includes/footer_custom.html
@@ -18,3 +18,12 @@ limitations under the License.
<p class="fs-2" align="center">Copyright © 2009-{{ site.time | date: "%Y" }}
The Apache Software Foundation,
Licensed under the <a
href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
<br />Apache and the Apache feather logo are trademarks of The Apache Software
Foundation.</p>
+
+{% if page.layout == 'project-layout' -%}
+ {% capture path %}{{ page.path | replace: "html", "yaml" | prepend:
"_data/"}}{% endcapture %}
+{% elsif page.layout == 'project-templates-layout' %}
+ {% assign path = '_layouts/project-templates-layout.html' -%}
+{% else -%}
+ {% assign path = page.path -%}
+{% endif -%}
+<div class="d-flex mt-2"> <p class="text-small text-grey-dk-000 mb-0"> <a
href="{{ site.repo }}/edit/main/{{ path }}" id="edit-this-page">Improve this
page</a> </p> </div>