Make all links relative

Now the abs_to_rel module is enabled, links can be made relative so they
work on the current environment.
This commit is contained in:
Oliver Davies 2025-05-29 16:42:25 +01:00
parent 0d359f81d6
commit 7a7dc297ca
349 changed files with 698 additions and 698 deletions

View file

@ -82,9 +82,9 @@
],
"body": [
{
"value": "\n <p>A great thing about <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2023\/01\/03\/tailwind-css-extensibility-is-one-of-its-best-features\">Tailwind CSS plugins<\/a> being written in JavaScript is that they can be tested using tools like Jest.<\/p>\n\n<p>Here's an example from https:\/\/github.com\/opdavies\/tailwindcss-plugin-jest-example (it may need updating to work with the latest Tailwind versions or to use the latest best practices):<\/p>\n\n<pre><code class=\"javascript\">function run(options = {}) {\n return postcss(\n tailwindcss({\n corePlugins: false,\n plugins: [plugin(options)]\n })\n )\n .process('@tailwind utilities;', {\n from: undefined\n })\n}\n\nexpect.extend({\n toMatchCss: cssMatcher\n})\n\ntest('it generates the correct classes with no variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n `\n\n run().then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n})\n\ntest('it generates the correct classes with variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n .hover\\\\:test:hover {\n display: block\n }\n .focus\\\\:test:focus {\n display: block\n }\n `\n\n run({ variants: ['hover', 'focus'] }).then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n});\n<\/code><\/pre>\n\n<p>Within the test, Tailwind can be run using PostCSS and generates styles based on a provided configuration, which is then checked against some expected output. If the generated styles match what was expected, the tests pass and the plugin is working as expected.<\/p>\n\n ",
"value": "\n <p>A great thing about <a href=\"/daily\/2023\/01\/03\/tailwind-css-extensibility-is-one-of-its-best-features\">Tailwind CSS plugins<\/a> being written in JavaScript is that they can be tested using tools like Jest.<\/p>\n\n<p>Here's an example from https:\/\/github.com\/opdavies\/tailwindcss-plugin-jest-example (it may need updating to work with the latest Tailwind versions or to use the latest best practices):<\/p>\n\n<pre><code class=\"javascript\">function run(options = {}) {\n return postcss(\n tailwindcss({\n corePlugins: false,\n plugins: [plugin(options)]\n })\n )\n .process('@tailwind utilities;', {\n from: undefined\n })\n}\n\nexpect.extend({\n toMatchCss: cssMatcher\n})\n\ntest('it generates the correct classes with no variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n `\n\n run().then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n})\n\ntest('it generates the correct classes with variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n .hover\\\\:test:hover {\n display: block\n }\n .focus\\\\:test:focus {\n display: block\n }\n `\n\n run({ variants: ['hover', 'focus'] }).then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n});\n<\/code><\/pre>\n\n<p>Within the test, Tailwind can be run using PostCSS and generates styles based on a provided configuration, which is then checked against some expected output. If the generated styles match what was expected, the tests pass and the plugin is working as expected.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>A great thing about <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2023\/01\/03\/tailwind-css-extensibility-is-one-of-its-best-features\">Tailwind CSS plugins<\/a> being written in JavaScript is that they can be tested using tools like Jest.<\/p>\n\n<p>Here's an example from https:\/\/github.com\/opdavies\/tailwindcss-plugin-jest-example (it may need updating to work with the latest Tailwind versions or to use the latest best practices):<\/p>\n\n<pre><code class=\"javascript\">function run(options = {}) {\n return postcss(\n tailwindcss({\n corePlugins: false,\n plugins: [plugin(options)]\n })\n )\n .process('@tailwind utilities;', {\n from: undefined\n })\n}\n\nexpect.extend({\n toMatchCss: cssMatcher\n})\n\ntest('it generates the correct classes with no variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n `\n\n run().then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n})\n\ntest('it generates the correct classes with variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n .hover\\\\:test:hover {\n display: block\n }\n .focus\\\\:test:focus {\n display: block\n }\n `\n\n run({ variants: ['hover', 'focus'] }).then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n});\n<\/code><\/pre>\n\n<p>Within the test, Tailwind can be run using PostCSS and generates styles based on a provided configuration, which is then checked against some expected output. If the generated styles match what was expected, the tests pass and the plugin is working as expected.<\/p>\n\n ",
"processed": "\n <p>A great thing about <a href=\"/daily\/2023\/01\/03\/tailwind-css-extensibility-is-one-of-its-best-features\">Tailwind CSS plugins<\/a> being written in JavaScript is that they can be tested using tools like Jest.<\/p>\n\n<p>Here's an example from https:\/\/github.com\/opdavies\/tailwindcss-plugin-jest-example (it may need updating to work with the latest Tailwind versions or to use the latest best practices):<\/p>\n\n<pre><code class=\"javascript\">function run(options = {}) {\n return postcss(\n tailwindcss({\n corePlugins: false,\n plugins: [plugin(options)]\n })\n )\n .process('@tailwind utilities;', {\n from: undefined\n })\n}\n\nexpect.extend({\n toMatchCss: cssMatcher\n})\n\ntest('it generates the correct classes with no variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n `\n\n run().then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n})\n\ntest('it generates the correct classes with variants', () =&gt; {\n const output = `\n .test {\n display: block\n }\n .hover\\\\:test:hover {\n display: block\n }\n .focus\\\\:test:focus {\n display: block\n }\n `\n\n run({ variants: ['hover', 'focus'] }).then(result =&gt; {\n expect(result.css).toMatchCss(output)\n })\n});\n<\/code><\/pre>\n\n<p>Within the test, Tailwind can be run using PostCSS and generates styles based on a provided configuration, which is then checked against some expected output. If the generated styles match what was expected, the tests pass and the plugin is working as expected.<\/p>\n\n ",
"summary": null
}
],