Skip to content

Commit

Permalink
docs: add unique page titles
Browse files Browse the repository at this point in the history
This patch adds unique page titles to the website. When a `title` is present in the page frontmatter, the layout will use it. When a title is not specified, the default `site.title` is used.

This makes navigating through the site much easier, especially when browsing with multiple tabs.
  • Loading branch information
stephenmathieson authored and isaacs committed Mar 5, 2018
1 parent 2323c3b commit 5b5e2ee
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 13 deletions.
1 change: 1 addition & 0 deletions docs/100/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: The TAP 100
---

# The TAP 100
Expand Down
8 changes: 7 additions & 1 deletion docs/_layouts/layout.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<!doctype html>
<title>{{ site.title }}</title>
<title>
{% if page.title %}
{{ page.title }} | {{ site.title }}
{% else %}
{{ site.title }}
{% endif %}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html {
Expand Down
1 change: 1 addition & 0 deletions docs/advanced/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Advanced Usage
---

# Advanced Usage
Expand Down
1 change: 1 addition & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: API
---

# API
Expand Down
1 change: 1 addition & 0 deletions docs/asserts/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Asserts
---

# Asserts
Expand Down
1 change: 1 addition & 0 deletions docs/basics/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Getting Started
---

# tap basics
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Change Log
---

## 11.0 2017-11-26
Expand Down
1 change: 1 addition & 0 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: CLI
---

# CLI
Expand Down
1 change: 1 addition & 0 deletions docs/coverage/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Coverage
---

# Coverage
Expand Down
15 changes: 8 additions & 7 deletions docs/grep/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Filtering Tests&#58; Grep
---

# Filtering Tests with Grep Options
Expand Down Expand Up @@ -88,15 +89,15 @@ TAP version 13
ok 1 - apples are tasty
1..1
ok 1 - apple # time=8.892ms
# Subtest: banana
ok 1 - bananas are yellow
1..1
ok 2 - banana # time=1.297ms
1..2
ok 1 - first # time=18.544ms
ok 2 - second # SKIP filter: /first/
1..2
# skip: 1
Expand Down Expand Up @@ -206,7 +207,7 @@ TAP version 13
ok 1 - apples are tasty
1..1
ok 1 - apple # time=5.166ms
ok 2 - banana # SKIP filter: /p/i
1..2
# skip: 1
Expand All @@ -217,7 +218,7 @@ ok 1 - first # time=11.805ms
ok 1 - i think
1..1
ok 1 - this is fine # time=0.86ms
ok 2 - i am ok with how things are proceeding # SKIP filter: /fi[ln]e/
1..2
# skip: 1
Expand Down Expand Up @@ -252,7 +253,7 @@ TAP version 13
ok 1 - apples are tasty
1..1
ok 1 - apple # time=4.35ms
ok 2 - banana # SKIP filter: /apple/
1..2
# skip: 1
Expand All @@ -279,7 +280,7 @@ ok 1 - first # SKIP filter out: /first/
ok 1 - therefor I am
1..1
ok 2 - i am ok with how things are proceeding # time=3.117ms
1..2
# skip: 1
ok 2 - second # time=9.441ms
Expand Down
1 change: 1 addition & 0 deletions docs/mochalike/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Mocha-like DSL
---

# Mocha-like DSL
Expand Down
3 changes: 2 additions & 1 deletion docs/only/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Filtering Tests&#58; Only
---

# Filtering Tests with Only Option
Expand Down Expand Up @@ -152,7 +153,7 @@ TAP version 13
ok 1 - got here
1..1
ok 2 - first child # time=1.609ms
ok 3 - second child # SKIP filter: only
1..3
# skip: 1
Expand Down
1 change: 1 addition & 0 deletions docs/parallel/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Parallel Tests
---

# Parallel Tests
Expand Down
1 change: 1 addition & 0 deletions docs/promises/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Promises
---

# Promises
Expand Down
1 change: 1 addition & 0 deletions docs/reporting/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Reporting
---

# Reporting
Expand Down
1 change: 1 addition & 0 deletions docs/snapshots/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Testing with Snapshots
---

# Testing with Snapshots
Expand Down
7 changes: 4 additions & 3 deletions docs/subtests/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Subtests
---

# Subtests
Expand Down Expand Up @@ -46,7 +47,7 @@ TAP version 13
1..1
ok 1 - this is fine
ok 1 - bar # time=1.831ms
1..1
ok 1 - foo # time=11.106ms
Expand Down Expand Up @@ -81,7 +82,7 @@ ok 1 - foo {
1..1
ok 1 - this is fine
}
1..1
}
Expand All @@ -103,7 +104,7 @@ ok 1 - foo
1..1
ok 1 - this is fine
}
1..1
}
Expand Down
3 changes: 2 additions & 1 deletion docs/tap-format/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: layout
title: Test Anything Protocol
---

# Test Anything Protocol
Expand Down Expand Up @@ -110,7 +111,7 @@ about a test point.

A test point can be marked as `todo` to indicate that it is going to
be implemented later, or `skip` to indicate that the test should not
be performed in the given context. `todo` and `skip` are
be performed in the given context. `todo` and `skip` are

A test point associated with a
Subtest can also have a `# time=...` directive indicating how long the
Expand Down

0 comments on commit 5b5e2ee

Please sign in to comment.