diff --git a/.eleventy.js b/.eleventy.js index 5b24790..34db01b 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,5 +1,7 @@ +const {EleventyHtmlBasePlugin} = require("@11ty/eleventy"); + module.exports = function (eleventyConfig) { - // eleventyConfig.addPlugin(EleventyHtmlBasePlugin); + eleventyConfig.addPlugin(EleventyHtmlBasePlugin); eleventyConfig.setLiquidOptions({ // greedy: false, @@ -26,10 +28,32 @@ module.exports = function (eleventyConfig) { brand: 'hippie', titlePrefix: '', titlePostfix: ' - HIPPIE', + placeholders: { + name: 'Vorname Nachname', + address: 'Straße Nr., PLZ Ort', + phone: '+49 (0)101 1337 48', + mail: 'name@domain.tld' + }, debugMode: true, legacyMode: false }); + eleventyConfig.addShortcode('text', function (text, attrId, attrClass) { + return `${text}`; + }); + + eleventyConfig.addShortcode('link', function (target, text, attrId, attrClass) { + if (text === '') { + text = target; + } + + if (target.indexOf('@') !== -1) { + target = 'mailto:' + target; + } + + return `${text}`; + }); + eleventyConfig.addPassthroughCopy({'source/art/images': 'art'}); eleventyConfig.addPassthroughCopy({'source/art/favicons/**/*.+(ico|png|svg)': '.'}); diff --git a/.gitignore b/.gitignore index a4481ea..6ae690a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # HIPPIE ################### build/** +deploy/** reports/** source/art/sprites/ source/art/images/sprite.* diff --git a/package.json b/package.json index 49351cc..8036798 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,11 @@ "clean:report": "rm -rf report/*", "clean:test": "rm -rf test/*", "style:compile": "sass source/style:build/css --load-path=vendor", + "style:deploy": "sass source/style:deploy/css --load-path=vendor", "style:watch": "sass --watch source/style:build/css --load-path=vendor", "build:new": "npm run clean:build && npx @11ty/eleventy && npm run style:compile", "build": "npx @11ty/eleventy && npm run style:compile", + "deploy": "npm run clean:deploy && npx @11ty/eleventy --output=deploy --pathprefix=hippie && npm run style:deploy", "serve": "npm run style:watch & npx @11ty/eleventy --serve" }, "private": true, diff --git a/source/screens/demo/basics.liquid b/source/screens/demo/basics.liquid index 017fcfd..6d190ec 100644 --- a/source/screens/demo/basics.liquid +++ b/source/screens/demo/basics.liquid @@ -3,8 +3,7 @@ title: Basics tags: - demoIndex --- -{% assign pageBase = "../" -%} -{% layout "hippie/page.liquid" %} +{% layout 'hippie/page.liquid' %} {% block title %}Grundlagen{% endblock %} @@ -278,7 +277,7 @@ tags: