Skip to content

Instantly share code, notes, and snippets.

@nunocodex
Last active August 29, 2015 14:05
Show Gist options
  • Save nunocodex/65e38c06567468cbd150 to your computer and use it in GitHub Desktop.
Save nunocodex/65e38c06567468cbd150 to your computer and use it in GitHub Desktop.
KirbyCMS blog tutorial
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title><?php if(!$page->isHomePage()) : ?><?php echo html($page->title()) ?> | <?php endif; ?><?php echo html($site->title()) ?></title>
<?php if($page_description = excerpt($page->text(), 100)) : ?>
<meta name="description" content="<?php echo html($page_description) ?>" />
<?php else : ?>
<meta name="description" content="<?php echo html($site->description()) ?>" />
<?php endif; ?>
<?php if($page->author() and $page_author = site()->user($page->author()->toString())) : ?>
<meta name="author" content="<?php e($page_author->firstname() or $page_author->lastname(), $page_author->firstname() . ' ' . $page_author->lastname(), $page_author) ?>" />
<?php elseif($site_author = $site->author()) : ?>
<meta name="author" content="<?php echo html($site_author) ?>" />
<?php endif; ?>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<?php echo js([
'https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js',
'https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js'
]); ?>
<![endif]-->
<?php echo css([
'assets/css/bootstrap.min.css',
'assets/css/style.css'
]) ?>
</head>
<body class="<?php echo html($page->template()) ?>">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment