Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemap #317

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
4 changes: 3 additions & 1 deletion pages/home/page-home.htm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
<div layout="column" layout-align="center center" id="featured-categories" >
<div layout-fill class="content-container">
<md-grid-list
md-cols="4"
md-cols="4"\
<img src="{{ category.images.first.thumbnail(800, 'auto')|default('http://placehold.it/460x300') }}"/><br>

md-row-height="1:1"
md-gutter="20px"

Expand Down
13 changes: 13 additions & 0 deletions pages/robots/page-robots.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
template: robots
protocol: all
published: true
name: Robots
url: /robots
---
# robots.txt for http://www.example.com/
User-agent: *
Disallow: /cyberworld/map/ # This is an infinite virtual URL space
Disallow: /tmp/ # these will soon disappear
Disallow: /foo.html
Sitemap: https://storename.lemonstand.com/sitemap
46 changes: 46 additions & 0 deletions pages/sitemap/page-sitemap.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
action: 'shop:products'
template: xml
protocol: all
published: true
name: Sitemap
url: /products.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for product in products %}
<url>
{% set page_url = "https:#{site_url('/')}product/#{product.url_name}" %}
<loc>{{ page_url }}</loc>
<lastmod>{{ product.updated_at|date("Y-m-d\\TH:i:sP") }}</lastmod>
</url>
{% endfor %}

{% for post in cmsContent('blog') %}
<url>
{% set page_url = "#{post.permalink}" %}
<loc>{{ page_url }}</loc>
<lastmod>{{ post.published_on | date("Y-m-d\\TH:i:sP") }}</lastmod>
</url>
{% endfor %}

{% for url, code in pages %}
{% set page_url = "https:#{site_url('/')}#{url}" %}
{% if '/:' not in page_url %}
<url>
<loc>{{ page_url | replace({"m//": "m/"}) }}</loc>
<lastmod>{{ page.published_on | date("Y-m-d\\TH:i:sP") }}</lastmod>
</url>
{% endif %}
{% endfor %}

{% for category in categories %}
<url>
{% set page_url = "https:#{site_url('/')}/category/#{category.url_name}" %}
<loc>{{ page_url | replace({"m//": "m/"}) }}</loc>
<lastmod>{{ post.published_on | date("Y-m-d\\TH:i:sP") }}</lastmod>
</url>
{% endfor %}
</urlset>


2 changes: 1 addition & 1 deletion resources/js/meyer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1483,4 +1483,4 @@ angular.module("lsAngularApp").filter("range", function() {
}
return arr;
};
});
});
4 changes: 4 additions & 0 deletions templates/robots.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
content_type: 'text/plain; charset=utf-8'
---
{{ page() }}
4 changes: 4 additions & 0 deletions templates/xml.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
content_type: 'text/xml; charset=utf-8'
---
{{ page() }}
1 change: 1 addition & 0 deletions theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ customFields:
headerBackgroundColor: { type: color, title: 'Header/footer background color', default: '#FFFFFF', comment: 'Color used for the header and footer background.' }
headerTextColor: { type: color, title: 'Header/footer text color', default: '#212121', comment: 'Color used for all header and footer text.' }
storeTitle: { type: text, title: 'Title of your Store', default: Meyer }
bannerTitleText: { type: text, title: 'Banner Title Text', default: Meyer }
bannerSentenceText: { type: text, title: 'Banner Sentence Text', default: 'A responsive LemonStand theme', comment: 'Text used for the homepage banner sentence.' }
signUpText: { type: text, title: 'Newsletter sign up text', default: 'Sign up for our newsletter.', comment: 'An incentive for people to sign up for your newsletter.' }
storeReturnPolicy: { type: text, title: 'Store return policy', default: 'Up to 30 days from purchase. Must not be opened or damaged.', comment: 'Let people know if they can return items after purchase.' }
Expand Down