Skip to content

Commit 6aaad06

Browse files
committed
Simplify code
1 parent 6add4a3 commit 6aaad06

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

app/src/Controller/DocumentationController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public function pageVersioned(string $version, string $path, Response $response,
5454
return $twig->render($response, $template, [
5555
'page' => $page,
5656
'breadcrumbs' => $this->pagesDirectory->getBreadcrumbsForPage($page),
57-
'github' => $page->getGithub(),
5857
]);
5958
}
6059

app/templates/partials/breadcrumbs.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
</nav>
2222
</div>
2323
<div>
24-
{% if github is defined %}
25-
<a href="{{ github }}" class="uk-button uk-button-text" target="_blank" rel="noopener">
24+
{% if page.github is defined %}
25+
<a href="{{ page.github }}" class="uk-button uk-button-text" target="_blank" rel="noopener">
2626
<i class="fab fa-github"></i> Edit this page
2727
</a>
2828
{% endif %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% if page.getFrontMatter().obsolete %}
22
<div class="uk-alert uk-alert-danger">
33
<p class="uk-alert-title"><i class="fa-solid fa-clock uk-icon"></i>Obsolete page</p>
4-
<p>This page requires updating for UserFrosting 6. You can help by <a href="{{ github }}">contributing on GitHub</a>.</p>
4+
<p>This page requires updating for UserFrosting 6. You can help by <a href="{{ page.github }}">contributing on GitHub</a>.</p>
55
</div>
66
{% endif %}

0 commit comments

Comments
 (0)