Skip to content

Commit

Permalink
Use relative path helper for links
Browse files Browse the repository at this point in the history
Fix bug where home buttons did not work properly on nested documentation levels.
  • Loading branch information
caendesilva committed Mar 30, 2022
1 parent c3c6198 commit fddbe55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/components/docs/sidebar-footer.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<footer class="p-4 mt-auto border-t">
<a href="../index.html" class="opacity-75 hover:opacity-100">Back to home page</a>
<a href="{{ Hyde::relativePath('index.html', $currentPage) }}" class="opacity-75 hover:opacity-100">Back to home page</a>
</footer>
2 changes: 1 addition & 1 deletion resources/views/components/docs/sidebar-header.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header class="h-16 p-4 border-b flex items-center">
<h2 class="font-bold opacity-75 hover:opacity-100 w-fit">
@if(Hyde::docsIndexPath() !== false)
<a href="../{{ Hyde::docsIndexPath() }}">
<a href="{{ Hyde::relativePath(Hyde::docsIndexPath(), $currentPage) }}">
{{ config('hyde.name') }} Docs
</a>
@else
Expand Down

0 comments on commit fddbe55

Please sign in to comment.