diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1e644e161..286a842bc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,7 +21,7 @@ body: attributes: label: To Reproduce description: "Steps to reproduce the behavior:" - value: | + placeholder: | 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -41,7 +41,7 @@ body: attributes: label: TiddlyWiki Configuration description: please complete the following information - value: | + placeholder: | - Version [e.g. v5.1.24] - Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc] - Plugins installed [e.g. Freelinks, TiddlyMap] diff --git a/bin/readme-bld.sh b/bin/readme-bld.sh index 198c3abd0..e7c9df564 100755 --- a/bin/readme-bld.sh +++ b/bin/readme-bld.sh @@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \ --output . \ --build readmes \ || exit 1 + +# tw.org readmes +node $TW5_BUILD_TIDDLYWIKI \ + editions/tw.org \ + --verbose \ + --output . \ + --build readmes \ + || exit 1 diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 000000000..e8e7664a7 --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1 @@ +

This community exists because TiddlyWiki is more useful when people share and work together.

This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.

We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.

These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.

Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.

It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.

As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.

\ No newline at end of file diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 772949c0d..a1b164c5c 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -198,6 +198,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links Settings/MissingLinks/Caption: Wiki Links Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet Settings/MissingLinks/Description: Enable links to missing tiddlers +SocialCard/Caption: Social Media Card +SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'') +SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online +SocialCard/PreviewUrl/Prompt: Full URL to preview image for this TiddlyWiki +SocialCard/PreviewUrl/Preview: Preview image: +SocialCard/Url/Prompt: Full URL of this TiddlyWiki StoryTiddler/Caption: Story Tiddler StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river. StoryView/Caption: Story View diff --git a/core/modules/commands/render.js b/core/modules/commands/render.js index b396deef9..bd8b23171 100644 --- a/core/modules/commands/render.js +++ b/core/modules/commands/render.js @@ -45,17 +45,22 @@ Render individual tiddlers and save the results to the specified files variableList = variableList.slice(2); } $tw.utils.each(tiddlers,function(title) { - var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]); - if(self.commander.verbose) { - console.log("Rendering \"" + title + "\" to \"" + filepath + "\""); + var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title])); + if(filenameResults.length > 0) { + var filepath = path.resolve(self.commander.outputPath,filenameResults[0]); + if(self.commander.verbose) { + console.log("Rendering \"" + title + "\" to \"" + filepath + "\""); + } + var parser = wiki.parseTiddler(template || title), + widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}), + container = $tw.fakeDocument.createElement("div"); + widgetNode.render(container,null); + var text = type === "text/html" ? container.innerHTML : container.textContent; + $tw.utils.createFileDirectories(filepath); + fs.writeFileSync(filepath,text,"utf8"); + } else { + console.log("Not rendering \"" + title + "\" because the filename filter returned an empty result"); } - var parser = wiki.parseTiddler(template || title), - widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}), - container = $tw.fakeDocument.createElement("div"); - widgetNode.render(container,null); - var text = type === "text/html" ? container.innerHTML : container.textContent; - $tw.utils.createFileDirectories(filepath); - fs.writeFileSync(filepath,text,"utf8"); }); return null; }; diff --git a/core/modules/parsers/wikiparser/rules/table.js b/core/modules/parsers/wikiparser/rules/table.js index 9b730922d..68811efc0 100644 --- a/core/modules/parsers/wikiparser/rules/table.js +++ b/core/modules/parsers/wikiparser/rules/table.js @@ -93,11 +93,12 @@ var processRow = function(prevColumns) { } // Check whether this is a heading cell var cell; + var start = this.parser.pos; if(chr === "!") { this.parser.pos++; - cell = {type: "element", tag: "th", children: []}; + cell = {type: "element", tag: "th", start: start, children: []}; } else { - cell = {type: "element", tag: "td", children: []}; + cell = {type: "element", tag: "td", start: start, children: []}; } tree.push(cell); // Record information about this cell @@ -121,6 +122,7 @@ var processRow = function(prevColumns) { } // Move back to the closing `|` this.parser.pos--; + cell.end = this.parser.pos; } col++; cellRegExp.lastIndex = this.parser.pos; @@ -169,12 +171,13 @@ exports.parse = function() { rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true}); } else { // Create the row - var theRow = {type: "element", tag: "tr", children: []}; + var theRow = {type: "element", tag: "tr", children: [], start: rowMatch.index}; $tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow"); rowContainer.children.push(theRow); // Process the row theRow.children = processRow.call(this,prevColumns); this.parser.pos = rowMatch.index + rowMatch[0].length; + theRow.end = this.parser.pos; // Increment the row count rowCount++; } diff --git a/core/modules/utils/transliterate.js b/core/modules/utils/transliterate.js index 4e91de234..ce1cbeddb 100644 --- a/core/modules/utils/transliterate.js +++ b/core/modules/utils/transliterate.js @@ -924,7 +924,7 @@ exports.transliterate = function(str) { }; exports.transliterateToSafeASCII = function(str) { - return str.replace(/[^\x00-\x7F]/g,function(ch) { + return str.replace(/[^\x20-\x7F]/g,function(ch) { return exports.transliterationPairs[ch] || "" }); }; diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid index 0fd8e2da3..7a6e7d97b 100644 --- a/core/palettes/Blanca.tid +++ b/core/palettes/Blanca.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid index cc3846b50..b5bdecb8a 100644 --- a/core/palettes/Blue.tid +++ b/core/palettes/Blue.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333353 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/BrightMute.tid b/core/palettes/BrightMute.tid index ddbd6b3cd..2762a995d 100644 --- a/core/palettes/BrightMute.tid +++ b/core/palettes/BrightMute.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/ContrastDark.tid b/core/palettes/ContrastDark.tid index 850a5863b..67552b30e 100644 --- a/core/palettes/ContrastDark.tid +++ b/core/palettes/ContrastDark.tid @@ -1,7 +1,7 @@ -title: $:/palettes/ContrastLight -name: Contrast (Light) -color-scheme: light -description: High contrast and unambiguous (light version) +title: $:/palettes/ContrastDark +name: Contrast (Dark) +color-scheme: dark +description: High contrast and unambiguous (dark version) tags: $:/tags/Palette type: application/x-tiddler-dictionary @@ -9,7 +9,7 @@ alert-background: #f00 alert-border: <> alert-highlight: <> alert-muted-foreground: #800 -background: #fff +background: #000 blockquote-bar: <> button-background: <> button-foreground: <> @@ -33,7 +33,8 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e -foreground: #000 +footnote-target-background: #4c4c4c +foreground: #fff highlight-background: #ffff00 highlight-foreground: #000000 message-background: <> @@ -82,8 +83,8 @@ tab-foreground: <> table-border: #dddddd table-footer-background: #a8a8a8 table-header-background: #f0f0f0 -tag-background: #000 -tag-foreground: #fff +tag-background: #fff +tag-foreground: #000 tiddler-background: <> tiddler-border: <> tiddler-controls-foreground-hover: #ddd diff --git a/core/palettes/ContrastLight.tid b/core/palettes/ContrastLight.tid index ade9f43f8..a10a1b8eb 100644 --- a/core/palettes/ContrastLight.tid +++ b/core/palettes/ContrastLight.tid @@ -1,7 +1,7 @@ -title: $:/palettes/ContrastDark -name: Contrast (Dark) -color-scheme: dark -description: High contrast and unambiguous (dark version) +title: $:/palettes/ContrastLight +name: Contrast (Light) +color-scheme: light +description: High contrast and unambiguous (light version) tags: $:/tags/Palette type: application/x-tiddler-dictionary @@ -9,7 +9,7 @@ alert-background: #f00 alert-border: <> alert-highlight: <> alert-muted-foreground: #800 -background: #000 +background: #fff blockquote-bar: <> button-background: <> button-foreground: <> @@ -33,7 +33,8 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e -foreground: #fff +footnote-target-background: #e5e5e5 +foreground: #000 highlight-background: #ffff00 highlight-foreground: #000000 message-background: <> @@ -82,8 +83,8 @@ tab-foreground: <> table-border: #dddddd table-footer-background: #a8a8a8 table-header-background: #f0f0f0 -tag-background: #fff -tag-foreground: #000 +tag-background: #000 +tag-foreground: #fff tiddler-background: <> tiddler-border: <> tiddler-controls-foreground-hover: #ddd diff --git a/core/palettes/CupertinoDark.tid b/core/palettes/CupertinoDark.tid index 7f08f4100..f13fc1e16 100644 --- a/core/palettes/CupertinoDark.tid +++ b/core/palettes/CupertinoDark.tid @@ -31,6 +31,7 @@ external-link-background: transparent external-link-foreground-hover: external-link-foreground-visited: #BF5AF2 external-link-foreground: #32D74B +footnote-target-background: #747474 foreground: #FFFFFF highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/DarkPhotos.tid b/core/palettes/DarkPhotos.tid index 71fa40f2f..5d086fc27 100644 --- a/core/palettes/DarkPhotos.tid +++ b/core/palettes/DarkPhotos.tid @@ -35,6 +35,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/DesertSand.tid b/core/palettes/DesertSand.tid index ddce80e27..12b06c948 100644 --- a/core/palettes/DesertSand.tid +++ b/core/palettes/DesertSand.tid @@ -39,6 +39,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #313163 external-link-foreground: #555592 +footnote-target-background: #fff7d9 foreground: #2D2A23 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/GruvBoxDark.tid b/core/palettes/GruvBoxDark.tid index 6c3fa6a73..e839fd7b4 100644 --- a/core/palettes/GruvBoxDark.tid +++ b/core/palettes/GruvBoxDark.tid @@ -40,6 +40,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #d3869b external-link-foreground: #8ec07c +footnote-target-background: #665c54 foreground: #fbf1c7 highlight-background: #ffff79 highlight-foreground: #000000 diff --git a/core/palettes/Nord.tid b/core/palettes/Nord.tid index e8e280998..5f18dce3f 100644 --- a/core/palettes/Nord.tid +++ b/core/palettes/Nord.tid @@ -40,6 +40,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #5E81AC external-link-foreground: #8FBCBB +footnote-target-background: #2E3440 foreground: #d8dee9 highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid index a91cd1b5f..c6693eb52 100644 --- a/core/palettes/Rocker.tid +++ b/core/palettes/Rocker.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/SolarFlare.tid b/core/palettes/SolarFlare.tid index 4d81bf531..932256665 100644 --- a/core/palettes/SolarFlare.tid +++ b/core/palettes/SolarFlare.tid @@ -131,6 +131,7 @@ external-link-background-hover: inherit external-link-background-visited: inherit external-link-background: inherit external-link-foreground-hover: inherit +footnote-target-background: #ded8c5 highlight-background: #ffff00 highlight-foreground: #000000 message-border: #cfd6e6 diff --git a/core/palettes/SolarizedDark.tid b/core/palettes/SolarizedDark.tid index bacd385b2..326f6a4fb 100644 --- a/core/palettes/SolarizedDark.tid +++ b/core/palettes/SolarizedDark.tid @@ -34,6 +34,7 @@ external-link-background-visited: inherit external-link-foreground: #268bd2 external-link-foreground-hover: external-link-foreground-visited: #268bd2 +footnote-target-background: #073642 foreground: #839496 highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/SolarizedLight.tid b/core/palettes/SolarizedLight.tid index 5d8757386..28ce1c7c2 100644 --- a/core/palettes/SolarizedLight.tid +++ b/core/palettes/SolarizedLight.tid @@ -34,6 +34,7 @@ external-link-background-visited: inherit external-link-foreground: #268bd2 external-link-foreground-hover: inherit external-link-foreground-visited: #268bd2 +footnote-target-background: #eee8d5 foreground: #657b83 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/SpartanDay.tid b/core/palettes/SpartanDay.tid index cc197144e..505427d33 100644 --- a/core/palettes/SpartanDay.tid +++ b/core/palettes/SpartanDay.tid @@ -33,6 +33,7 @@ external-link-background: transparent external-link-foreground-hover: external-link-foreground-visited: external-link-foreground: +footnote-target-background: #ececec foreground: rgba(0, 0, 0, 0.87) highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/SpartanNight.tid b/core/palettes/SpartanNight.tid index dc47a0774..b36ecb526 100644 --- a/core/palettes/SpartanNight.tid +++ b/core/palettes/SpartanNight.tid @@ -33,6 +33,7 @@ external-link-background: transparent external-link-foreground-hover: external-link-foreground-visited: #7c318c external-link-foreground: #9e3eb3 +footnote-target-background: #494949 foreground: rgba(255, 255, 255, 0.7) highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/Twilight.tid b/core/palettes/Twilight.tid index 4c127f822..1cd8efab1 100644 --- a/core/palettes/Twilight.tid +++ b/core/palettes/Twilight.tid @@ -42,6 +42,7 @@ external-link-background-visited: inherit external-link-foreground: rgb(179, 179, 255) external-link-foreground-hover: inherit external-link-foreground-visited: rgb(153, 153, 255) +footnote-target-background: <> foreground: rgb(179, 179, 179) highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid index 067f32519..76307acee 100644 --- a/core/palettes/Vanilla.tid +++ b/core/palettes/Vanilla.tid @@ -41,6 +41,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/templates/social-metadata.tid b/core/templates/social-metadata.tid new file mode 100644 index 000000000..6f9dc11bc --- /dev/null +++ b/core/templates/social-metadata.tid @@ -0,0 +1,38 @@ +title: $:/core/templates/social-metadata +tags: $:/tags/RawMarkupWikified + +\procedure meta-plain(name,source,name-attribute:"name") +\whitespace trim +<%if [has[text]] %> + <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [get[text]encodehtml[]] }}}/>"> + <$text text={{{ [charcode[10]] }}}/> +<%endif%> +\end meta-plain + +\procedure meta-wikified(name,source,name-attribute:"name") +\whitespace trim +<%if [has[text]] %> + <$wikify name="html" text={{{ [get[text]] }}} output="text"> + <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [encodehtml[]] }}}/>"> + <$text text={{{ [charcode[10]] }}}/> + +<%endif%> +\end meta-wikified + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock conditional commentinline commentblock +<> + + +<> +<> +<> +<> +<> + + +<> +<> +<> +<> +<> +<> diff --git a/core/ui/ControlPanel/SocialCard.tid b/core/ui/ControlPanel/SocialCard.tid new file mode 100644 index 000000000..591c6550f --- /dev/null +++ b/core/ui/ControlPanel/SocialCard.tid @@ -0,0 +1,22 @@ +title: $:/core/ui/ControlPanel/SocialCard +tags: $:/tags/ControlPanel/Advanced +caption: {{$:/language/ControlPanel/SocialCard/Caption}} + +\define lingo-base() $:/language/ControlPanel/ + +<> + +|<$link to="$:/SiteTitle"><> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> | +|<$link to="$:/SiteSubtitle"><> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> | +|<$link to="$:/SiteDomain"><> |<$edit-text tiddler="$:/SiteDomain" default="" tag="input"/> | +|<$link to="$:/SiteUrl"><> |<$edit-text tiddler="$:/SiteUrl" default="" tag="input"/> | +|<$link to="$:/SitePreviewUrl"><> |<$edit-text tiddler="$:/SitePreviewUrl" default="" tag="input"/> | + +<%if [[$:/SitePreviewUrl]get[text]else[]!is[blank]] %> +
+
+<> +
+ +
+<%endif%> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-wikitext-parser.js b/editions/test/tiddlers/tests/test-wikitext-parser.js index 9c3ae78ce..a3fe0d2d3 100644 --- a/editions/test/tiddlers/tests/test-wikitext-parser.js +++ b/editions/test/tiddlers/tests/test-wikitext-parser.js @@ -324,6 +324,100 @@ describe("WikiText parser tests", function() { }); + it("should parse tables", function() { + let wikitext = ` +|!Cell1 |!Cell2 | +|Cell3 |Cell4 |`.trim(); + + let expectedParseTree = [{ + type: 'element', + tag: 'table', + start: 0, + end: 33, + rule: 'table', + children: [{ + type: 'element', + tag: 'tbody', + start: 0, + end: 33, + children: [{ + type: 'element', + tag: 'tr', + attributes: { + 'class': { name: 'class', type: 'string', value: 'evenRow' }, + }, + orderedAttributes: [ + { name: 'class', type: 'string', value: 'evenRow' }, + ], + start: 0, + end: 18, + children: [{ + type: 'element', + tag: 'th', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 1, + end: 8, + children: [{type: 'text', text: 'Cell1', start: 2, end: 7}], + }, { + type: 'element', + tag: 'th', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 9, + end: 16, + children: [{type: 'text', text: 'Cell2', start: 10, end: 15}], + }], + }, { + type: 'element', + tag: 'tr', + attributes: { + 'class': { name: 'class', type: 'string', value: 'oddRow' }, + }, + orderedAttributes: [ + { name: 'class', type: 'string', value: 'oddRow' }, + ], + start: 18, + end: 33, + children: [{ + type: 'element', + tag: 'td', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 19, + end: 25, + children: [{type: 'text', text: 'Cell3', start: 19, end: 24}], + }, { + type: 'element', + tag: 'td', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 26, + end: 32, + children: [{type: 'text', text: 'Cell4', start: 26, end: 31}], + }], + }], + }], + }]; + + expect(parse(wikitext)).toEqual(expectedParseTree); + }); }); })(); diff --git a/editions/tw.org/tiddlywiki.info b/editions/tw.org/tiddlywiki.info index 5e4202ccc..3dbd86516 100644 --- a/editions/tw.org/tiddlywiki.info +++ b/editions/tw.org/tiddlywiki.info @@ -16,6 +16,8 @@ "--setfield","[tag[external-image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain", "--setfield","[tag[external-image]]","text","","text/plain", "--render","$:/core/save/all","index.html","text/plain"], + "readmes": [ + "--render","[[Code of Conduct]]","code-of-conduct.md","text/html"], "favicon": [ "--savetiddler","$:/favicon.ico","favicon.ico"], "static": [ diff --git a/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid b/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid index 02f177082..07576617b 100644 --- a/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid +++ b/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid @@ -4,6 +4,6 @@ tags: Definitions title: Intertwingled Innovations type: text/vnd.tiddlywiki -Intertwingled Innovations Limited is the company through which [[JeremyRuston]] performs commercial consultancy work helping companies and individuals release the businesss value of TiddlyWiki. +Intertwingled Innovations Limited is the company through which [[JeremyRuston]] performs commercial consultancy work helping companies and individuals release the business value of TiddlyWiki. See https://intertwingledinnovations.com/ for more information. diff --git a/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid b/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid index 084586e77..14e324456 100644 --- a/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid +++ b/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid @@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki By default, a [[TiddlyWiki on Node.js]] instance using a [[wiki folder|TiddlyWikiFolders]] will create new tiddler files by using the sanitised and disambiguated title as filename. All filepath operations are relative to a `default-tiddler-location` which defaults to the wiki folder's `tiddlers/` directory. This can be overridden by mapping a path in the wiki's tiddlywiki.info file, by using a `default-tiddler-location` property in the `config` object. -The default file extension of `.tid` is used for tiddlers that are missing the `type` field, or for tiddlers of type "text/vnd.tiddlywiki". Tidders of other types are saved according to their MIME types (defined at boot startup). +The default file extension of `.tid` is used for tiddlers that are missing the `type` field, or for tiddlers of type "text/vnd.tiddlywiki". Tiddlers of other types are saved according to their MIME types (defined at boot startup). Both the logical path (directory and file name) and the file extension can be customised independently by creating optional tiddlers [[$:/config/FileSystemPaths]] and [[$:/config/FileSystemExtensions]]. @@ -29,7 +29,7 @@ Logical paths do not include the file-on-disk's extension (see below), and they <<.note "All paths are relative to the wiki's `default-tiddler-location`.">> -This will store newly created system tiddlers that are not drafts of other tiddlers in `./_system/` (after stripping the `$:/` prefix). Next, all drafts have the path separator characters in their titles replaced by "_" and are stored in `./drafts/`. Then tiddlers tagged [[task]] are stored in a subdirectory `./mytasks/`. Finally, all tidders not tagged with "externalnote" will match the final `[!tag[externalnote]addprefix[wiki/]]` storing these in `./wiki/`. In this example, tiddlers tagged with "externalnote" have been imported using [[tiddlywiki.files Files]] with an "isEditableFile" flag set to true, causing the server to remember their original file path in the $:/config/OriginalTiddlerPaths tiddler. +This will store newly created system tiddlers that are not drafts of other tiddlers in `./_system/` (after stripping the `$:/` prefix). Next, all drafts have the path separator characters in their titles replaced by "_" and are stored in `./drafts/`. Then tiddlers tagged [[task]] are stored in a subdirectory `./mytasks/`. Finally, all tiddlers not tagged with "externalnote" will match the final `[!tag[externalnote]addprefix[wiki/]]` storing these in `./wiki/`. In this example, tiddlers tagged with "externalnote" have been imported using [[tiddlywiki.files Files]] with an "isEditableFile" flag set to true, causing the server to remember their original file path in the $:/config/OriginalTiddlerPaths tiddler. Whenever a tiddler generates a $:/config/FileSystemPaths filter match, any `/` or `\` in the tiddler title is mapped to a path separator. With the above filters, the non-system, non-draft tiddler titled `some/thing/entirely/new` (with no tags) will be saved to `./wiki/some/thing/entirely/new.tid` (ie, the file `new.tid` in a directory called `entirely/`). Thus, $:/config/FileSystemPaths itself will end up in `./_system/config/FileSystemPaths.tid` or `.\_system\config\FileSystemPaths.tid`, depending on the platform. @@ -39,7 +39,7 @@ Normally, the file system extension of a tiddler on disk is determined by the pr If the tiddler does not have such field values, then the `type` field is referenced to find a matching file-type, with `.tid` used for tiddlers without a type value. The boot engine defines a set of these tiddler-type to file-type relationships in the [[$:/boot/boot.js]] tiddler. Search for `// Add file extension information` to find the section of code that defines these relationships. -The file extension of individual tidders can be customised by creating a tiddler [[$:/config/FileSystemExtensions]] containing one or more [[filter expressions|Filter Syntax]], each on a line of its own. Every time a tiddler is saved to disk it is tested against these filters, and the first output of the first filter to produce any output is taken as the file extension to be used for the tiddler file. Extensions should always start with a leading dot (see example). If no filter matches, the default extension is used. If the extension has changed a new file is created and the old file is deleted. +The file extension of individual tiddlers can be customised by creating a tiddler [[$:/config/FileSystemExtensions]] containing one or more [[filter expressions|Filter Syntax]], each on a line of its own. Every time a tiddler is saved to disk it is tested against these filters, and the first output of the first filter to produce any output is taken as the file extension to be used for the tiddler file. Extensions should always start with a leading dot (see example). If no filter matches, the default extension is used. If the extension has changed a new file is created and the old file is deleted. <<.note """A result of ".tid" will force the tiddler to be written to disk as a single-file text tiddler. A result of ".json" will force the tiddler to be written to disk as a single file tiddler in json-format (a single tiddler fields object in an array), NOT as a tiddler of type "application/json". All other recognised file-types will be saved using their defined extension along with an accompanying *.meta file of the same name which describes all fields but the "text" field.""">> @@ -51,6 +51,6 @@ The file extension of individual tidders can be customised by creating a tiddler [tag[.tid]then[.tid]] ``` -This will cause all tidders that have the tag ".txt" to be saved at the filepath determined by the File System Paths filters, but with their text field saved as a *.txt file, and all other fields saved as a *.txt.meta file. +This will cause all tiddlers that have the tag ".txt" to be saved at the filepath determined by the File System Paths filters, but with their text field saved as a *.txt file, and all other fields saved as a *.txt.meta file. Next, all tiddlers that have the ".json" tag are saved as *.json files. Finally, all tiddlers that have tag ".tid" are saved as single files. If a tiddler matches none of the filters, the default extension determined by the tiddlers `type` field would be used. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/releasenotes/Releases.tid b/editions/tw5.com/tiddlers/releasenotes/Releases.tid index 57e5d3fd4..bd68f1ac6 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Releases.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Releases.tid @@ -6,6 +6,8 @@ type: text/vnd.tiddlywiki New releases of TiddlyWiki and TiddlyDesktop are announced via the [[official discussion groups|Forums]] and [[Twitter|https://twitter.com/TiddlyWiki]] +The prerelease of the next version of TiddlyWiki can be found at https://tiddlywiki.com/prerelease for testing and review purposes. + See the [[TiddlyWiki Archive]] to download older versions. <> diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index 000b3219f..8daf3f4e1 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -1,6 +1,6 @@ caption: link created: 20131024141900000 -modified: 20231113093304323 +modified: 20240730065043721 tags: Widgets title: LinkWidget type: text/vnd.tiddlywiki @@ -69,11 +69,13 @@ This causes the tooltip to be the ''tooltip'' field of the target tiddler. If th The link widget automatically determines and applies the following classes to links: -* `tc-tiddlylink` - applied to all links +* `tc-tiddlylink` - applied to ''all'' links * `tc-tiddlylink-external` - applied to external, non-tiddler links * `tc-tiddlylink-internal` - applied to tiddler links * `tc-tiddlylink-missing` - applied to tiddler links where the target tiddler doesn't exist * `tc-tiddlylink-resolves` - applied to tiddler links when the target tiddler does exist +* `tc-tiddlylink-shadow` - applied to tiddler links when the target is a shadow tiddler +** `tc-tiddlylink-shadow tc-tiddlylink-resolves` - applied to ''overwritten'' shadow tiddlers Use the `class` attribute to specify additional css classes, or `overrideClass` to apply only that but not the above defaults, e.g. when used in a LinkCatcherWidget: diff --git a/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid b/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid index dd8e72be9..c38ddf015 100644 --- a/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid +++ b/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid @@ -1,5 +1,5 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple -description: TiddlyWiki 5 复合条目 +description: 复合条目 name: text/vnd.tiddlywiki-multiple group: 开发者 group-sort: 2 diff --git a/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid b/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid index 745734788..aee5a301e 100644 --- a/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid +++ b/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid @@ -1,5 +1,5 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple -description: TiddlyWiki 5 複合條目 +description: 複合條目 name: text/vnd.tiddlywiki-multiple group: 開發者 group-sort: 2 diff --git a/plugins/tiddlywiki/geospatial/docs/geomap.tid b/plugins/tiddlywiki/geospatial/docs/geomap.tid index ba933ec8a..e72d3c156 100644 --- a/plugins/tiddlywiki/geospatial/docs/geomap.tid +++ b/plugins/tiddlywiki/geospatial/docs/geomap.tid @@ -53,13 +53,10 @@ If no base layers are defined by `<$geobaselayer>` widgets within the `<$geomap> lat="51.751944" long="-1.257778" alt="0" - text="""This is Oxford!"""/> + text="""{{$:/core/images/star-filled}} This is Oxford!"""/> <$data title="Output" text="""<$geomap state=<> > - <$list filter="[all[tiddlers+shadows]tag[$:/tags/GeoMarker]]"> - <$geolayer lat={{!!lat}} long={{!!long}} alt={{!!alt}} color={{!!color}}/> - """/> <$data $tiddler="$:/plugins/tiddlywiki/geospatial"/> @@ -80,7 +77,24 @@ If no base layers are defined by `<$geobaselayer>` widgets within the `<$geomap> """/> -<$data $tiddler="ui/PopupTemplate"/> +<$data + title="Oxford" + tags="$:/tags/GeoMarker" + caption="Oxford" + lat="51.751944" + long="-1.257778" + alt="0" + text="""{{$:/core/images/star-filled}} This is Oxford!"""/> + properties=""/> +<$data title="ui/PopupTemplate" text=""" +
+ <$let currentTiddler={{{ [jsonget[properties],[title]] }}}> + <$link><$text text=<>/> + + <$transclude $tiddler=<> $mode="block"/> + +
+"""/> <$data $tiddler="$:/plugins/tiddlywiki/geospatial"/> diff --git a/plugins/tiddlywiki/highlight/usage.tid b/plugins/tiddlywiki/highlight/usage.tid index 5e5b51600..fc1d8f12c 100644 --- a/plugins/tiddlywiki/highlight/usage.tid +++ b/plugins/tiddlywiki/highlight/usage.tid @@ -31,8 +31,8 @@ You can import language definitions into <$text text="JavaScript"/> tiddlers, wi First, locate the language file(s) you need. You can fetch the files from the following CDNs: -* >>jsDelivr -* >>unpkg +* > class="tc-tiddlylink-external" target="_blank">jsDelivr +* > class="tc-tiddlylink-external" target="_blank">unpkg Then, click the button below to create a "highlight" module. Copy and paste the content of a language file into the the text area. Give your tiddler a meaningful title so you can keep track of the languages you've installed. You may choose to either create one tiddler per language or lump all language definitions into one tiddler. Save and reload your wiki. diff --git a/plugins/tiddlywiki/markdown/styles.tid b/plugins/tiddlywiki/markdown/styles.tid index f4d953d1b..4185d4304 100644 --- a/plugins/tiddlywiki/markdown/styles.tid +++ b/plugins/tiddlywiki/markdown/styles.tid @@ -36,7 +36,7 @@ code-body: yes margin-left: 0.25em; } .markdown a.footnote-ref:target, .markdown .footnote-item:target { - background-color: <>; + background-color: <>; scroll-margin-top: {{{ [{$:/themes/tiddlywiki/vanilla/options/stickytitles}match[yes]then[120px]else[60px]] }}}; } .markdown li > p:first-child {