Browse Source

add noindex/nofollow attributes on pagination pages

pull/7/head
ghost 3 years ago
parent
commit
d60fa45866
  1. 6
      public/index.phtml

6
public/index.phtml

@ -8,12 +8,14 @@
<?php if ($ns) { ?> <?php if ($ns) { ?>
<?php if ($page) { ?> <?php if ($page) { ?>
<title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | PART <?php echo $page; ?> | KVAZAR</title> <title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | PART <?php echo $page; ?> | KVAZAR</title>
<meta name="robots" content="noindex,follow" />
<?php } else { ?> <?php } else { ?>
<title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | KVAZAR</title> <title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | KVAZAR</title>
<?php } ?> <?php } ?>
<?php } else { ?> <?php } else { ?>
<?php if ($page) { ?> <?php if ($page) { ?>
<title>KVAZAR | PART <?php echo $page; ?></title> <title>KVAZAR | PART <?php echo $page; ?></title>
<meta name="robots" content="noindex,follow" />
<?php } else if ($tx) { ?> <?php } else if ($tx) { ?>
<title><?php echo $tx && isset($data[0]['key']) ? $data[0]['key'] : $tx; ?> | KVAZAR</title> <title><?php echo $tx && isset($data[0]['key']) ? $data[0]['key'] : $tx; ?> | KVAZAR</title>
<?php } else { ?> <?php } else { ?>
@ -76,13 +78,13 @@
<?php if (!$tx && ($newer !== false || $older !== false)) { ?> <?php if (!$tx && ($newer !== false || $older !== false)) { ?>
<div class="t-center pt-16 pb-27"> <div class="t-center pt-16 pb-27">
<?php if ($newer !== false) { ?> <?php if ($newer !== false) { ?>
<a href="<?php echo $newer; ?>">newer</a> <a href="<?php echo $newer; ?>"<?php echo $newer ? ' rel="nofollow"' : false; ?>>newer</a>
<?php } ?> <?php } ?>
<?php if ($newer !== false && $older !== false) { ?> <?php if ($newer !== false && $older !== false) { ?>
| |
<?php } ?> <?php } ?>
<?php if ($older !== false) { ?> <?php if ($older !== false) { ?>
<a href="<?php echo $older; ?>">older</a> <a href="<?php echo $older; ?>"<?php echo $older ? ' rel="nofollow"' : false; ?>>older</a>
<?php } ?> <?php } ?>
</div> </div>
<?php } ?> <?php } ?>

Loading…
Cancel
Save