diff --git a/config/changelog.yaml b/config/changelog.yaml index ecc95f53fd5..36fd51026db 100644 --- a/config/changelog.yaml +++ b/config/changelog.yaml @@ -16,6 +16,10 @@ unreleased: lunetius: - Lunetius is a lacerna, a historical Roman cloak - Initial release + plugin-versionfree-svg: + - This is a plugin to strip (FreeSewing) versdion info out of the SVG + to allow you to diff your SVG output between FreeSewing versions + - Initial release tiberius: - Tiberius is a tunica, a historic Roman tunic - Initial release diff --git a/config/descriptions.yaml b/config/descriptions.yaml index cf993fd88d3..79603967828 100644 --- a/config/descriptions.yaml +++ b/config/descriptions.yaml @@ -60,6 +60,7 @@ plugin-svgattr: 'A FreeSewing plugin to set SVG attributes' plugin-theme: 'A FreeSewing plugin that provides a default theme' plugin-title: 'A FreeSewing plugin to add a title to your pattern parts' plugin-validate: 'A FreeSewing plugin that validates aspects of your code' +plugin-versionfree-svg: 'A FreeSewing plugin to keep version info out of your SVG to allow easy diffs across versions' prettier-config: "FreeSewing's shared configuration for prettier" remark-jargon: 'A Remark plugin for jargon terms' rendertest: 'A FreeSewing pattern to test (y)our render engine our CSS' diff --git a/scripts/addpatterndocs.js b/scripts/addpatterndocs.js index 48cd36e0eb7..8077381ad81 100644 --- a/scripts/addpatterndocs.js +++ b/scripts/addpatterndocs.js @@ -31,13 +31,15 @@ const subpages = [ 'needs' ] -const patternDocsPage = pattern => ` +const patternDocsPage = pattern => `--- --- ` -const fixme = ` +const fixme = `--- +--- + This documentation page is yet to be written. @@ -65,7 +67,9 @@ const patternDocsSubPage = (pattern, sub) => { } } -const optionDocsPage = (pattern, option) => "---\n\n" + +const optionDocsPage = (pattern, option) => `--- +title: ` + i18n.strings.en[`options.${pattern}.${option}.title`] + + "\n---\n\n" + i18n.strings.en[`options.${pattern}.${option}.description`] + "\n" const present = folder => { diff --git a/scripts/optiondocsimages.js b/scripts/optiondocsimages.js index f41d2aaab0e..a7f9dba69b0 100644 --- a/scripts/optiondocsimages.js +++ b/scripts/optiondocsimages.js @@ -17,6 +17,7 @@ const theme = require('../packages/plugin-theme/dist') const pi = require('../packages/pattern-info/dist') const models = require('../packages/models/dist') const wb32 = models.withBreasts.size32 +const noVersions = require('../packages/plugin-versionfree-svg') const image = (pattern, option) => ` @@ -29,7 +30,6 @@ const insertImage = (file, pattern, option) => { if (md.indexOf('image shows the effect of this option') === -1) fs.writeFileSync(file, md+image(pattern, option)) } - const createImages = () => { for (const pattern of pi.list) { const Pattern = require(`../packages/${pattern}/dist`) @@ -40,7 +40,7 @@ const createImages = () => { idPrefix: `${pattern}_${option}`, embed: true, } - }).use(theme) + }).use(theme).use(noVersions) const file = path.join('markdown', 'org', 'docs', 'patterns', pattern, 'options', option.toLowerCase(), `${pattern}_${option.toLowerCase()}_sample.svg`) console.log(file) const svg = p.sampleOption(option).render()