Make your WordPress site irresistible. Natural SEO attraction with: - robots.txt management - sitemap.xml generation - LLMs.txt support - Google integration (Analytics, Search Console, Tag Manager) - Schema.org structured data - Open Graph / Twitter Card meta tags - AMP support - Visual elements gallery - Built-in backup/restore module Includes build.sh and .distignore for WordPress-installable release ZIPs.
165 lines
5.3 KiB
PHP
165 lines
5.3 KiB
PHP
<!doctype html>
|
|
<html ⚡>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title><?php echo esc_html($title ?? get_the_title()); ?></title>
|
|
<link rel="canonical" href="<?php echo esc_url($canonical_url ?? get_permalink()); ?>">
|
|
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
|
|
|
<!-- AMP Runtime -->
|
|
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
|
|
|
<!-- AMP Components -->
|
|
<script async custom-element="amp-img" src="https://cdn.ampproject.org/v0/amp-img-0.1.js"></script>
|
|
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
|
|
|
|
<!-- Structured Data -->
|
|
<script type="application/ld+json">
|
|
<?php echo wp_json_encode($structured_data ?? []); ?>
|
|
</script>
|
|
|
|
<!-- AMP Styles -->
|
|
<style amp-custom>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
.amp-header {
|
|
border-bottom: 1px solid #eee;
|
|
padding-bottom: 20px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.amp-title {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
line-height: 1.2;
|
|
margin: 0 0 15px 0;
|
|
color: #222;
|
|
}
|
|
|
|
.amp-meta {
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.amp-meta time {
|
|
color: #0073aa;
|
|
}
|
|
|
|
.amp-content {
|
|
font-size: 1.1rem;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.amp-content h1,
|
|
.amp-content h2,
|
|
.amp-content h3 {
|
|
color: #222;
|
|
margin-top: 2em;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
.amp-content p {
|
|
margin-bottom: 1.5em;
|
|
}
|
|
|
|
.amp-content amp-img {
|
|
margin: 1.5em 0;
|
|
}
|
|
|
|
.amp-footer {
|
|
border-top: 1px solid #eee;
|
|
padding-top: 20px;
|
|
margin-top: 40px;
|
|
text-align: center;
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
}
|
|
|
|
.amp-link {
|
|
color: #0073aa;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.amp-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
body {
|
|
padding: 15px;
|
|
}
|
|
|
|
.amp-title {
|
|
font-size: 1.6rem;
|
|
}
|
|
|
|
.amp-content {
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<!-- AMP Boilerplate -->
|
|
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
|
</head>
|
|
<body>
|
|
<article class="amp-article">
|
|
<header class="amp-header">
|
|
<h1 class="amp-title"><?php echo esc_html($title ?? get_the_title()); ?></h1>
|
|
<div class="amp-meta">
|
|
<time datetime="<?php echo esc_attr(get_the_date('c')); ?>">
|
|
<?php echo esc_html(get_the_date()); ?>
|
|
</time>
|
|
<?php if (get_the_author()): ?>
|
|
by <span class="amp-author"><?php echo esc_html(get_the_author()); ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="amp-content">
|
|
<?php echo $content ?? apply_filters('the_content', get_the_content()); ?>
|
|
</div>
|
|
|
|
<footer class="amp-footer">
|
|
<p>
|
|
<a href="<?php echo esc_url($canonical_url ?? get_permalink()); ?>" class="amp-link">
|
|
View full version
|
|
</a>
|
|
|
|
|
<a href="<?php echo esc_url(home_url()); ?>" class="amp-link">
|
|
<?php echo esc_html(get_bloginfo('name')); ?>
|
|
</a>
|
|
</p>
|
|
</footer>
|
|
</article>
|
|
|
|
<!-- Analytics -->
|
|
<?php
|
|
$analytics_id = $this->get_option('analytics_id', '');
|
|
if ($analytics_id):
|
|
?>
|
|
<amp-analytics type="gtag" data-credentials="include">
|
|
<script type="application/json">
|
|
{
|
|
"vars" : {
|
|
"gtag_id": "<?php echo esc_js($analytics_id); ?>",
|
|
"config" : {
|
|
"<?php echo esc_js($analytics_id); ?>": {
|
|
"groups": "default"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</amp-analytics>
|
|
<?php endif; ?>
|
|
</body>
|
|
</html>
|