Skip to content

Instantly share code, notes, and snippets.

Avatar

Philip Daniel Hayton philipdanielhayton

View GitHub Profile
@philipdanielhayton
philipdanielhayton / tailwind.config.js
Created Sep 5, 2021
Tailwind JIT Safelist String Generator
View tailwind.config.js
module.exports = {
purge: {
content: [
"..."
],
safelist: [
...createSafeListString({
rules: ["mt", "mb", "pt", "pb"],
values: [1, 2, 3, 4, 6, 8, 12, 16, 24],
responsive: [null, "xs", "sm", "md", "lg"],
@philipdanielhayton
philipdanielhayton / XmlSitemap.cshtml
Created Aug 3, 2016
Umbraco Xml Sitemap using Razor
View XmlSitemap.cshtml
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
var root = Umbraco.TypedContentSingleAtXPath("//homePage");
umbraco.library.ChangeContentType("text/xml");
}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@renderUrl(root)
</urlset>
@helper renderUrl(IPublishedContent node)