SEO for Pages - Surge-ee/SurgeEO GitHub Wiki

###MAGIC! Pages allow you to assign SEO data to an arbitrary URL.This means that you can manage SEO data for any page from the admin area.

This is especially useful for pages which list multiple entries, or pages which exist purely in templates.

  • Home Pages
  • Blog or Article Listings
  • Events Listings
  • Anytime it's not convenient to have a single entry on a page

##Get Started From the SurgeEO Options page, head over to the Pages section. You'll see a listing of pages which currently exist, or a message saying there are no pages created yet. Either way, you can go ahead and create new pages. Pages Settings

##Add Your Data From here you can edit pages already entered or create new pages. The fields are fill out are:

  • URL: The URL of the page. You can enter in any URL on your site. URLs are saved without domain data, so switching environments, servers or domains will not be an issue. This also accounts for sub-folders, so moving your site from a top-level (example.com) into a sub-folder (example.com/blog) is handled!
  • Title, Keyword, Description: Enter in your SEO data for that page as you would for an entry or page!

This example shows data for your home page: Pages Settings

##Retrieving Data

Getting data into your templates is identical to using the entry add-on tags. As of 2.0.0, the page-specific versions of the tags have been deprecated. In this invocation, we don't have to define a URL segment to match, as the tag will figure it outs on its own. In the case where a uri has both an entry and page-specific seo data, the entry data will be used.

This will match the current page URL with the URL entered in the Pages Options sections as explained above. If a match is found, the SEO data will be populated. If a match is not found, it will fallback to the defined defaults from the Global Options.

{embed="site/_header"
	title="{exp:surgeeo:title}"
	keywords="{exp:surgeeo:keywords}"
	description="{exp:surgeeo:description}"
}
<body>
	<div class="container">
		<div class="row">
			<article>
				<h2>Hard-coded page</h2>
				Because even professionals occasionally need to!
			</article>
		</div>
	</div>
</body>
⚠️ **GitHub.com Fallback** ⚠️