Our content structure for different API versions is:
content/
├── v1/
│ ├── command1.md
│ └── subdir
│ └── command2.md
├── v2/
│ ├── command1.md
│ └── subdir
│ └── command2.md
└── _index.md
... v3,v4 ...
Most of the content across versions is the same. to point to content in other directories, Because of the versions, we can’t use relative URLs starting from root, but from depth. we use relative links like, say inside a sub dir.
#from a page 2 levels deep
[command1](../../command1)
#from a page4 levels deep
[command1](../../../../command1)
depending on the level the ../
starts increasing & the page is flooded with lots of ../../../../
.
Is there any trick to either set as a new base as a variable per page (or automatically fetched) and do it like this:
+++
base = './././'
+++
[command1]({{base}}/command1)
or use a directory-level root so that
inside content/v1 base=/v1
inside content/v2 base=/v2
so that relative URLs can be shortened.
Any suggestion on this would be great …