Improved Schema notation to hopefully improve SEO

This commit is contained in:
Sam Collins 2017-03-01 00:43:51 +00:00
parent 5d9096a86c
commit 45c59f0707
No known key found for this signature in database
GPG Key ID: 233C5943C800FE30
5 changed files with 23 additions and 5 deletions

View File

@ -305,7 +305,6 @@ PAYMENT_PROVIDERS = {
SASS_PRECISION = 8
SASS_PROCESSOR_INCLUDE_DIRS = [
# str(ROOT_DIR),
str(APPS_DIR) + '/static/sass',
str(ROOT_DIR) + '/node_modules',
]

View File

@ -39,7 +39,7 @@ urlpatterns = [
r'^api/uploader/$',
markdown_uploader, name='markdown_uploader_page'
),
url(r'^blog/$', blog, name='contact'),
url(r'^blog/$', blog, name='blog'),
url(r'^blog/rss/$', BlogFeed()),
url(r'^blog/(?P<slug>[0-9A-Za-z_\-]+)/$', blog, name='blog-item'),
url(r'^blog/category/(?P<category>[0-9A-Za-z_\-]+)/$', blog, name='blog-category'),

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -4,3 +4,7 @@ $black: #000;
$pink: #f2dede;
$dark-pink: #eed3d7;
$red: #b94a48;
$teal: #008080;
$brand-primary: $teal;

View File

@ -6,9 +6,24 @@
<div class="row">
<div class="col-sm-8">
{% for post in posts %}
<a href="{{ post.get_absolute_url }}"><h1>{{ post.title }}</h1></a>
<p>Published: {{ post.published_date }}</p>
<p>{{ post.description|safe_markdown }}</p>
<article itemscope itemtype="http://schema.org/Article">
<a href="{{ post.get_absolute_url }}"><h1 itemprop="name">{{ post.title }}</h1></a>
<div>
Published: <span itemprop="datePublished" content="{{ post.published_date|date:"c" }}">{{ post.published_date }}</span>
{% if post.updated_date != post.published_date %}
Updated: <span itemprop="dateModified" content="{{ post.updated_date|date:"c" }}">{{ post.updated_date }}</span>
{% endif %}
</div>
{% if post.image %}
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<img src="{{ post.image.url }}" class="img-fluid"/>
<meta itemprop="url" content="{{ post.image.url }}">
<meta itemprop="width" content="{{ post.image.width }}">
<meta itemprop="height" content="{{ post.image.height }}">
</div>
{% endif %}
<span itemprop="articleBody">{{ post.description|safe_markdown }}</span>
</article>
{% endfor %}
{% if posts.num_pages > 1 %}