Skip to content

Commit

Permalink
Update how to create links in docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
arielshaqed committed Aug 2, 2023
1 parent 33f6396 commit 6801638
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/project/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ redirect_from:

Any contribution to the docs, whether it is in conjunction with a code contribution or as a standalone, is appreciated.

Please see [the contributing guide]({{ site.baseurl }}/project/contributing.html) for details on contributing to lakeFS in general.
Please see [the contributing guide]({% link project/contributing.md %}) for details on contributing to lakeFS in general.

{% include toc.html %}

Expand Down Expand Up @@ -66,7 +66,16 @@ Multiple callout types are available. Please review [this page](./callouts.html)
## Links 🔗

{% raw %}
Links should use absolute paths in conjunction with `{{ site.baseurl }}`, e.g. `{{ site.baseurl }}/foo/example.md`.

Links should use absolute paths in conjunction with `{% link %}`, e.g. `{%
link foo/example.md %}`.

Adding a link with an anchor is a bit trickier. Create a _reference_ `[link
text][link-reference]` and then define the anchor at the end of the document:
```markdown
[link-reference]: {% link foo.example.md %}#anchor
```

{% endraw %}

This is so that references work within the versioned documentation that [is deployed](https://github.com/treeverse/lakeFS/blob/master/.github/workflows/docs-release.yaml#L26-L45).
Expand Down

0 comments on commit 6801638

Please sign in to comment.