Skip to content

Commit 33ebea1

Browse files
ENH - added a backtrace line to the top of every page, see #810
- the backtrace shows the current page, plus the parent pages - it allows to navigate to and explore related sections on the website
1 parent a9959af commit 33ebea1

File tree

12 files changed

+49
-10
lines changed

12 files changed

+49
-10
lines changed

_includes/backtrace

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% assign backtrace = page.url | slice: 1, 999 | split: "/" %}
2+
3+
{% if backtrace[0] == "configuration" or backtrace[0] == "example" or backtrace[0] == "faq" or backtrace[0] == "reference" or backtrace[0] == "references_methods" or backtrace[0] == "references_papers" or backtrace[0] == "template" or backtrace[0] == "tutorial" or backtrace[0] == "video" or backtrace[0] == "walkthrough" %}
4+
{% assign backtrace = "documentation" | split: "/" | concat: backtrace %}
5+
{% endif %}
6+
7+
{% assign thisurl = "" %}
8+
9+
<small><p>
10+
{% for item in backtrace %}
11+
{% if item == "documentation" %}
12+
<a href="/documentation">{{ item }}</a> /
13+
{% else %}
14+
{% assign thisurl = thisurl | append: "/" | append: item %}
15+
<a href="{{ thisurl }}">{{ item }}</a> /
16+
{% endif %}
17+
{% endfor %}
18+
</p></small>

_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
{% include left %}
1818
</div>
1919
<div class="col-sm-8 main-page-content">
20+
{% include backtrace %}
2021
{{ content }}
2122
</div>
2223
<div class="col-sm-3">

development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The source code in the FieldTrip toolbox is split over multiple directories refl
1313

1414
We use a combination of tools (GitHub, Mastodon, website, mailman) that are loosely linked to each other; for example, every news item on the website is automatically tweeted. An overview is presented on the [integration](/development/integration) page.
1515

16-
- [Contribute to the development](/contribute)
16+
- [Contribute to the development](/development/contribute)
1717
- [Guidelines](/development/guideline)
1818
- [Testing](/development/testing)
1919
- [Toolbox architecture](/development/architecture)

example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ category: example
77

88
Here you can find example MATLAB scripts together with documentation that show specific analyses done in FieldTrip or in MATLAB. The documentation here is often not as elaborate as the [tutorials](/tutorial), but goes more in detail into specific aspects of the data, code or analysis.
99

10-
We invite you to [add your own](/contribute) example scripts or frequently asked questions to the website. Also tutorials can be added. Every time you explain somebody something about FieldTrip, please consider whether you could use the website for this, so others can learn from it as well. If you want to contribute one of your example scripts, please [add it directly](/contribute) to the website or [contact](/contact) us.
10+
We invite you to [add your own](/development/contribute) example scripts or frequently asked questions to the website. Also tutorials can be added. Every time you explain somebody something about FieldTrip, please consider whether you could use the website for this, so others can learn from it as well. If you want to contribute one of your example scripts, please [add it directly](/development/contribute) to the website or [contact](/contact) us.
1111

1212
See also the [tutorials](/tutorial) and [frequently asked questions](/faq).
1313

faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ category: faq
77

88
On this page you can find answers to a variety of FieldTrip and MATLAB related questions.
99

10-
We invite you to [add your own](/contribute) example scripts or frequently asked questions on the website. Also tutorials can be added. Every time you explain somebody something about FieldTrip, please consider whether you could use the website for this, so others can learn from it as well.
10+
We invite you to [add your own](/development/contribute) example scripts or frequently asked questions on the website. Also tutorials can be added. Every time you explain somebody something about FieldTrip, please consider whether you could use the website for this, so others can learn from it as well.
1111

1212
See also the [tutorials](/tutorial) and [example scripts](/example).
1313

faq/preproc/artifact.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
---
2-
title: Artifacts
2+
title: Questions about artifacts
33
---
4+
5+
# {{ page.title }}
6+
7+
{% include pagelist %}

faq/preproc/dataformat.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
---
2-
title: Specific data formats
2+
title: Questions about specific data formats
33
---
4+
5+
# {{ page.title }}
6+
7+
{% include pagelist %}

faq/preproc/datahandling.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
---
2-
title: Data handling
2+
title: Questions about data handling
33
---
4+
5+
# {{ page.title }}
6+
7+
{% include pagelist %}

faq/preproc/events.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
---
2-
title: Trials, triggers and events
2+
title: Questions about trials, triggers and events
33
---
4+
5+
# {{ page.title }}
6+
7+
{% include pagelist %}

faq/stats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Title: Statistical questions
2+
title: Statistical questions
33
---
44

55
# {{ page.title }}

0 commit comments

Comments
 (0)