Merge pull request #267 from MaevaBrunelles/support-seo-plugin
Add support for SEO Pelican plugin
This commit is contained in:
commit
21dd3f677b
5 changed files with 79 additions and 69 deletions
|
@ -44,6 +44,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
|
||||||
- [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image)
|
- [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image)
|
||||||
- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors)
|
- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors)
|
||||||
- [Tipue Search](https://github.com/getpelican/pelican-plugins/blob/master/tipue_search/)
|
- [Tipue Search](https://github.com/getpelican/pelican-plugins/blob/master/tipue_search/)
|
||||||
|
- [SEO](https://github.com/pelican-plugins/seo)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
|
@ -114,19 +114,22 @@
|
||||||
<meta name="msapplication-TileColor" content="{{ BROWSER_COLOR }}">
|
<meta name="msapplication-TileColor" content="{{ BROWSER_COLOR }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||||
{% if REL_CANONICAL %}
|
{% if REL_CANONICAL %}
|
||||||
{% if page %}
|
{% if page %}
|
||||||
<link rel="canonical" href="{{ SITEURL }}/{{ page.url }}">
|
<link rel="canonical" href="{{ SITEURL }}/{{ page.url }}">
|
||||||
{% elif article %}
|
{% elif article %}
|
||||||
<link rel="canonical" href="{{ SITEURL }}/{{ article.url }}">
|
<link rel="canonical" href="{{ SITEURL }}/{{ article.url }}">
|
||||||
{% elif page_name == 'index' and not articles_previous_page %}
|
{% elif page_name == 'index' and not articles_previous_page %}
|
||||||
<link rel="canonical" href="{{ SITEURL }}/">
|
<link rel="canonical" href="{{ SITEURL }}">
|
||||||
{% elif author or category or tag or page_name == 'index' %}
|
{% elif author or category or tag or page_name == 'index' %}
|
||||||
<link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}">
|
<link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
|
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
<meta name="author" content="{{ AUTHOR }}" />
|
<meta name="author" content="{{ AUTHOR }}" />
|
||||||
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||||
{% if SITELOGO %}
|
{% if SITELOGO %}
|
||||||
{% set default_cover = SITELOGO %}
|
{% set default_cover = SITELOGO %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -21,3 +22,4 @@
|
||||||
"description": "{{ article.summary|striptags }}"
|
"description": "{{ article.summary|striptags }}"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||||
{% if OG_LOCALE %}
|
{% if OG_LOCALE %}
|
||||||
{% set default_locale = OG_LOCALE %}
|
{% set default_locale = OG_LOCALE %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -12,3 +13,4 @@
|
||||||
{% if SITELOGO %}
|
{% if SITELOGO %}
|
||||||
<meta property="og:image" content="{{ SITELOGO }}">
|
<meta property="og:image" content="{{ SITELOGO }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||||
{% if OG_LOCALE %}
|
{% if OG_LOCALE %}
|
||||||
{% set default_locale = OG_LOCALE %}
|
{% set default_locale = OG_LOCALE %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -21,3 +22,4 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<meta property="og:image" content="{{ SITELOGO }}">
|
<meta property="og:image" content="{{ SITELOGO }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue