Skip to content

Instantly share code, notes, and snippets.

View isralduke's full-sized avatar

isral Duke isralduke

View GitHub Profile
@jasonvarga
jasonvarga / calendar_month.html
Last active October 2, 2015 19:48
Creating a single page dynamic URL calendar. This assumes a URL scheme like /calendar/month/2015/01
{{ calendar:set_month folder="calendar" year="{ segment_3 }" month="{ segment_4 }" }}
<h1>{{ calendar:month_name }} {{ segment_3 }}</h1>
{{ calendar:prev_month }}
<a href="/calendar/month/{{ year }}/{{ month }}" title="{{ month_name }} {{ year }}">&larr; Prev</a>
{{ /calendar:prev_month }}
{{ calendar:date_select attr="id:month-select" }}
@bgarrant
bgarrant / Automatic-Sitemap-XML-Generator-for-Statamic-CMS-Pages-and-Mounted-Collections.md
Last active July 28, 2020 17:02
Automatic Sitemap XML Generator for Statamic CMS Pages and Mounted Collections

How to automatically generate a Sitemap XML file using Statamic CMS.

This method will work for all Pages and Mounted Collections (just like Pages view in CP).

  1. Create a template called sitemap.html and add it to your theme/layouts/ folder.
  2. Add the following code to the new template
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ nav from="/" include_home="true" include_entries="true" exclude="our-team" }}