foundation / foundation/panini

Macro to differentiate between pages on different paths

Open
#168 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
593
Forks
104
PR merge metrics
No merged PRs in 30d

Description

When there is just one file called `index.html` this works fine:

```
$ cat header.html
{{#ifpage 'index'}}
You are at the home page
{{/ifpage}}
```

But when there are multiple directories with an `index.html` per directory, this code need to be enhanced (but how?)

The request is for some kind of differentiator to indicate the path to the file. The result might be something like this:

```
$ cat header.html
{{#ifpage '/index'}}
You are at the home page
{{/ifpage}}

{{#ifpage '/articles/index'}}
You are in the articles section
{{/ifpage}}

{{#ifpage 'index'}}
You are on some random page named index
{{/ifpage}}

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.