diff --git a/.eleventy.js b/.eleventy.js index 6b68556cb..cbedb2bcd 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,10 +1,12 @@ const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); +// const UpgradeHelper = require("@11ty/eleventy-upgrade-help"); module.exports = function (eleventyConfig) { eleventyConfig.setUseGitIgnore(false); eleventyConfig.addPlugin(syntaxHighlight); eleventyConfig.addPlugin(EleventyHtmlBasePlugin); + // eleventyConfig.addPlugin(UpgradeHelper); eleventyConfig.addPassthroughCopy({ "favicon.ico": "favicon.ico" }); eleventyConfig.addPassthroughCopy({ "docs/main.css": "dist/main.css" }); eleventyConfig.addPassthroughCopy({ dist: "dist" }); @@ -53,10 +55,11 @@ module.exports = function (eleventyConfig) { }); eleventyConfig["dir"] = { - input: "./", - ouput: "docs/_site", - includes: "docs/_includes", - data: "docs/_data", + input: ".", + ouput: "_site", + includes: "_includes", + layouts: "_includes", + data: "_data", }; return eleventyConfig; }; diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e399741d4..2097dd51d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,6 +30,6 @@ jobs: - name: Deploy docs uses: peaceiris/actions-gh-pages@v3 with: - publish_dir: ./docs/_site + publish_dir: ./_site github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: gh_docs_deploy diff --git a/.gitignore b/.gitignore index 9ee663398..75786b8dd 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ docs/mockup/patterns node_modules/ stamp-yarn stats.json +/_site/* diff --git a/docs/_data/_permalink.js b/_data/_permalink.js similarity index 100% rename from docs/_data/_permalink.js rename to _data/_permalink.js diff --git a/docs/_data/layout.js b/_data/layout.js similarity index 100% rename from docs/_data/layout.js rename to _data/layout.js diff --git a/docs/_includes/layout.liquid b/_includes/layout.liquid similarity index 100% rename from docs/_includes/layout.liquid rename to _includes/layout.liquid diff --git a/docs/_includes/layout_patternslib.liquid b/_includes/layout_patternslib.liquid similarity index 100% rename from docs/_includes/layout_patternslib.liquid rename to _includes/layout_patternslib.liquid diff --git a/package.json b/package.json index 1ce97fc08..470a32d04 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "nwsapi": "Since version 2.2.3 some selectors do not work anymore. See https://github.com/dperini/nwsapi/issues/83" }, "dependencies": { + "@11ty/eleventy-upgrade-help": "2", "@patternslib/pat-code-editor": "4.0.1", "@patternslib/patternslib": "^9.9.4", "backbone": "1.4.1", @@ -68,7 +69,7 @@ "build:webpack:dev": "NODE_ENV=development webpack --config webpack.config.js", "build:webpack:plone": "NODE_ENV=production DEPLOYMENT=plone webpack --config webpack.config.js", "build:webpack:dev:plone": "NODE_ENV=development DEPLOYMENT=plone webpack --config webpack.config.js", - "build:docs": "ELEVENTY_ENV=production npx @11ty/eleventy --output docs/_site/ --pathprefix=mockup", + "build:docs": "ELEVENTY_ENV=production npx @11ty/eleventy --pathprefix=mockup", "build:stats": "NODE_ENV=production webpack --config webpack.config.js --json > stats.json", "build:stats:plone": "NODE_ENV=production DEPLOYMENT=plone webpack --config webpack.config.js --json > stats.json", "build": "run-s clean build:webpack build:docs", @@ -77,7 +78,7 @@ "postinstall": "patch --forward node_modules/select2/select2.js < patches/select2.patch || true", "collect:externaldocs": "copyup -V node_modules/@patternslib/patternslib/src/pat/**/documentation.md node_modules/@patternslib/pat-*/README.md node_modules/pat-*/README.md docs/external/", "start:webpack": "NODE_ENV=development webpack serve --config webpack.config.js", - "start:docs": "ELEVENTY_ENV=development npx @11ty/eleventy --serve --port 8001 --output docs/_site/", + "start:docs": "ELEVENTY_ENV=development npx @11ty/eleventy --serve --port 8001 ", "start": "npm-run-all clean --parallel start:*", "test": "jest", "testwatch": "jest --watch", diff --git a/src/pat/autotoc/README.md b/src/pat/autotoc/README.md index 2b552e120..0abaf4ed8 100644 --- a/src/pat/autotoc/README.md +++ b/src/pat/autotoc/README.md @@ -1,4 +1,5 @@ --- +layout: layout.liquid permalink: "pat/autotoc/" title: Autotoc --- diff --git a/yarn.lock b/yarn.lock index 6451da488..c02f4f79a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,6 +39,14 @@ linkedom "^0.14.19" prismjs "^1.29.0" +"@11ty/eleventy-upgrade-help@2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@11ty/eleventy-upgrade-help/-/eleventy-upgrade-help-2.0.5.tgz#2db0a2971aaaf40d5da2d8cfea5b4a15c93433ce" + integrity sha512-sIH/ObNN2QDyd9Tqzb4N5gKuhgmq7VDO5o/GNpD+jMwCmMFumUiCoNcpp1tlRonuNp7IAVrXIg6SYDp6aqvQUw== + dependencies: + chalk "^4.1.1" + semver "^7.3.5" + "@11ty/eleventy-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@11ty/eleventy-utils/-/eleventy-utils-1.0.1.tgz#e89dc94b475284e5003525db5078663c5087db82" @@ -3452,7 +3460,7 @@ chalk@^2.0.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==