Skip to content

Instantly share code, notes, and snippets.

@dijux
Forked from shawn-crigger/superhead.html
Created October 31, 2020 14:15
Show Gist options
  • Save dijux/6e01f55ec8468577273b115c5c40b98d to your computer and use it in GitHub Desktop.
Save dijux/6e01f55ec8468577273b115c5c40b98d to your computer and use it in GitHub Desktop.
My HTML head meta tags
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//ajax.googleapis.com">
<link rel="dns-prefetch" href="//farm7.staticflickr.com">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?
/*
$seo_title => 'Title Tag',
$seo_description => 'Description',
$seo_keywords => 'Keywords, '
$current_page => 'Current Page Title',
$site_name => 'Site Name from Settings Library',
$author_name => 'Used for Copyrighting Pull from User Model',
*/
?>
<!-- Website Name | Your Slogan | Use Keywords In Your Title And Description -->
<title><?= $seo_title ?></title>
<!-- Website Name | Your Slogan | Use Keywords In Your Title And Description -->
<meta name="description" content="<?= $seo_description ?>">
<meta name="author" content="<?= $author_name ?> (<?= $site_name ?> - <?= site_url() ?>)">
<meta name="abstract" content="<?= $site_name ?> | <?= $current_page ?>">
<meta name="keywords" content="<?= $seo_keywords ?>">
<meta name="audience" content="all">
<meta name="distribution" content="global">
<meta name="author" content="<?= $author_name ?> (<?= $site_name ?> - <?= site_url() ?>)">
<meta name="owner" content="<?= $site_name ?> (r) 2011-<?= date('Y'); ?>">
<meta name="publisher" content="<?= $author_name ?> (<?= $site_name ?> - <?= site_url() ?>)">
<meta name="copyright" content="<?= $site_name ?> (r) 2011-<?= date('Y'); ?>">
<meta name="page-topic" content="General">
<!-- Humans Text File, Just like a Robots file but for Humans damit! http://humanstxt.org/ -->
<link type="text/plain" rel="author" href="<?= base_url('/humans.txt') ?>" />
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/">
<meta name="DC.title" content="<?= $seo_title ?>">
<meta name="DC.creator" content="<?= $author_name ?> (<?= $site_name ?> - <?= site_url() ?>)">
<meta name="DC.subject" content="<?= $site_name ?> | <?= $current_page ?>">
<meta name="DC.description" content="<?= $seo_description ?>">
<meta name="DC.publisher" content="<?= $author_name ?> (<?= $site_name ?> - <?= site_url() ?>)">
<meta name="DC.contributor" content="<?= $author_name ?> (<?= $site_name ?> - <?= site_url() ?>)">
<meta name="DC.type" content="Text" scheme="DCTERMS.DCMIType">
<meta name="DC.format" content="text/html" scheme="DCTERMS.IMT">
<meta name="DC.language" content="en" scheme="DCTERMS.RFC3066">
<meta name="DC.relation" content="http://dublincore.org/" scheme="DCTERMS.URI">
<meta name="DC.rights" content="<?= $site_name ?> (r) 2011-<?= date('Y'); ?>">
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "<?= site_url() ?>" r (SS~~000 1))'>
<!-- Dublen Core Geo Tags http://geotags.com/geo/geotags2.html -->
<!-- Useful tool to get your Cords http://itouchmap.com/latlong.html -->
<meta name="ICBM" content="33.68906,-78.886694">
<meta name="geo.position" content="33.68906,-78.886694">
<meta name="geo.placename" content="Myrtle Beach, South Carolina, United States">
<meta name="geo.region" content="US-SC">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="MSThemeCompatible" content="No">
<meta name="application-name" content="<?= $site_name ?>">
<meta name="msapplication-tooltip" content="<?= $seo_description ?>">
<!-- Could add a way to track MS Windows Pinned sites by adding url to goto in below line -->
<meta name="msapplication-starturl" content="<?= site_url('/'); ?>">
<!-- Could add a way to track MS Windows Pinned sites by adding url to goto in above line -->
<?php
/**
* Facebook open graph meta tag debugger.
* @link https://developers.facebook.com/docs/sharing/best-practices#tags Proper FB open graph meta tags
* @link https://developers.facebook.com/tools/debug/og/object FB Open Graph Debugger to make sure things work properly
*/
?>
<meta property="og:title" content="<?= $seo_title ?>">
<meta property="og:image" content="<?= img_path() ?>apple-touch-icon.png">
<meta property="og:site_name" content="<?= $site_name ?>">
<meta property="og:description" content="<?= $seo_description ?>">
<meta property="og:type" content="business">
<meta property="og:url" content="<?= current_url(); ?>">
<?php
/*
<!-- not sure how to get these below, maybe using a menu system or something -->
<link rel='prev' title='Contact' href='http://www.websitename.com/firstpage/' />
<link rel='next' title='Gallery' href='http://www.websitename.com/secondpage/' />
*/
?>
<link rel='canonical' href='<?= current_url() ?>' />
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment