Last active
March 1, 2021 11:16
-
-
Save apoorvmote/552387dd95883f5c3fabc06f253ba7c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"printWidth": 120, | |
"proseWrap": "always", | |
"semi": false, | |
"overrides": [ | |
{ | |
"files": ["*.html"], | |
"options": { | |
"parser": "go-template" | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: Hugo with TailwindCSS | |
--- | |
<p>Welcome to my blog</p> | |
<p>You can publicly access <a href="https://github.com/apoorvmote/hugo-tailwindcss">source code</a> of this blog on github.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>{{ .Title }}</title> | |
<style> | |
{{ $options := dict "inlineImports" true }} | |
{{ $styles := resources.Get "css/styles.css" | resources.PostCSS $options }} | |
{{ if hugo.IsProduction }} | |
{{ $styles = $styles | minify | resources.PostProcess }} | |
{{ end }} | |
{{ $styles.Content | safeCSS }} | |
</style> | |
</head> | |
<body> | |
{{ block "main" . }}{{ end }} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "main" }} | |
<article class="mx-auto mt-6 prose prose-indigo lg:prose-lg xl:prose-xl 2xl:prose-2xl"> | |
<h1 class="text-4xl">{{ .Title }}</h1> | |
{{ .Content }} | |
</article> | |
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
purge: { | |
content: ["./hugo_stats.json", "./layouts/**/*.html"], | |
extractors: [ | |
{ | |
extractor: (content) => { | |
let els = JSON.parse(content).htmlElements | |
return els.tags.concat(els.classes, els.ids) | |
} | |
} | |
], | |
mode: 'all', | |
enabled: process.env.HUGO_ENVIRONMENT === "production", | |
options: { | |
keyframes: true, | |
} | |
}, | |
darkMode: false, // or 'media' or 'class' | |
theme: { | |
extend: {}, | |
}, | |
variants: { | |
extend: {}, | |
}, | |
plugins: [require("@tailwindcss/typography")], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment