Skip to content

Commit 463f436

Browse files
committed
Back To Top True/False
In the following Update back to top feature under each page's footer can now be changed to not be included by using the following command " back_to_top: false ", where as it is by default controlled globally, the default value in config has now moved to the Default.html itself so that in the feature different templates can be used.
1 parent e5fbca8 commit 463f436

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

_config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ github_base_url: "https://github.com/VerzatileDevOrg/Programming_HandBook"
99
aux_links:
1010
Contribute to the Github Repository: https://github.com/VerzatileDevOrg/Programming_HandBook
1111

12-
back_to_top: true # Works through Footer.html
13-
1412
plugins:
1513
- jekyll-last-modified-at
1614

1715
# Optional. The default date format, used if none is specified in the tag.
1816
last-modified-at:
19-
date-format: '%d/%m/%Y'
17+
date-format: '%d/%m/%Y'

_includes/components/footer.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div class="footer">
22
<hr>
33

4-
{% if site.back_to_top %}
5-
<p>
6-
<a href="" id="back-to-top">Back to Top</a>
7-
</p>
4+
{% if page.back_to_top != false %}
5+
<p>
6+
<a href="#" id="back-to-top">Back to Top</a>
7+
</p>
88
{% endif %}
99

1010
<div>

_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: table_wrappers
33
include_language_switch_script: false
4+
back_to_top: true
45
---
56

67
<!DOCTYPE html>

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Home
33
layout: default
44
nav_order: 1
55
has_children: false
6+
back_to_top: false
67
---
78

89
## About

0 commit comments

Comments
 (0)