Skip to content

Commit

Permalink
Add title to html title tag
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderTigron committed Oct 7, 2021
1 parent c57cadb commit bbca03b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/Skeleton/Application/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ public function run() {
$template = \Skeleton\Core\Web\Template::get();
if (isset($this->config->base_uri)) {
$template->assign('base_uri', $this->config->base_uri);
if (isset($this->config->title)) {
$template->assign('title', $this->config->title);
}
}
$template->display('@skeleton-application-api/index.twig');
return;
Expand Down
2 changes: 1 addition & 1 deletion template/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<title>{{ title|default('Swagger API') }}</title>
<link rel="stylesheet" type="text/css" href="/skeleton-application-api/swagger-ui.css" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
Expand Down

0 comments on commit bbca03b

Please sign in to comment.