https://github.com/sanderdlm/kirby-seo-basics
Quickstart guide for Kirby SEO basics
https://github.com/sanderdlm/kirby-seo-basics
Last synced: over 1 year ago
JSON representation
Quickstart guide for Kirby SEO basics
- Host: GitHub
- URL: https://github.com/sanderdlm/kirby-seo-basics
- Owner: sanderdlm
- Created: 2017-06-01T11:02:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T11:06:48.000Z (about 9 years ago)
- Last Synced: 2025-03-20T15:34:25.082Z (over 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Kirby SEO basics
This repository is a quickstart guide to set up your Kirby site with basic SEO.
So far I've included the following:
* Sitemap [(credit)](https://getkirby.com/docs/cookbook/xmlsitemap)
* Robots.txt
* Open graph meta tags
I have written a step-by-step for each component.
### Sitemap
Files needed:
* /content/sitemap
* /site/templates/sitemap.php
Copy the /content/sitemap folder to your own content folder. This folder only exists to generate a route and load the template, the content file inside it is empty.
Place the sitemap.php template in your own /site/templates/ folder. Visit your site and navigate to http:///sitemap to test the template. You should see an XML sitemap.
Visit the [Google Search Console](https://www.google.com/webmasters/tools/home), register your domain (both HTTP and HTTPS) and then [submit your sitemap to Google](https://www.google.com/webmasters/tools/sitemap-list). You can also test the submitted sitemap.
### Robots.txt
Files needed:
* robots.txt
This is a barebones, basic robots.txt. Copy it your website's root folder and change the sitemap URL inside it to the one you generated in the last step.
### Meta tags & Open Graph tags
Files needed:
* /blueprints/site.yml
* /snippets/header.php
If you haven't made any customizations to your site.yml, simply replace yours with the one from this repo. If you have modified your own site blueprint, append the following fields:
```yml
description:
label: Description
type: textarea
og_title:
label: Open Graph title
type: text
og_site_name:
label: Open Graph site name
type: text
og_description:
label: Open Graph description
type: textarea
og_image:
label: Open Graph image
type: image
```
You can now browse to /panel/options and fill in your title, meta description and Open graph information.
Once you've done this, copy the header.php snippet to your own snippets folder. If you don't want to override your own, make sure to add the following tags to yours:
```php
```
You can now use the header snippet in any template. I've included a very basic default template to illustrate.
## Conclusion
That's it. You should now have a working sitemap, robots.txt & meta tags on your Kirby website.
## Contact
The easiest way to contact me about this is through Twitter: [@dreadnip](https://twitter.com/dreadnip).
If you have any issues or suggestions, please let me know.