Tutorial: How to use TiddlyWiki as a static website generator

1,261 views
Skip to first unread message

Anne-Laure Le Cunff

unread,
Apr 21, 2020, 10:53:38 PM4/21/20
to TiddlyWiki
Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!

Chris Aldrich

unread,
Apr 21, 2020, 11:58:10 PM4/21/20
to TiddlyWiki
Busy day! :) I've added your tutorial to the IndieWeb wiki. I'm curious if you have an example site to go with it that we could list as well?

TonyM

unread,
Apr 22, 2020, 12:23:54 AM4/22/20
to TiddlyWiki
Anne-Laure,

I had a look, although did not action I did follow the details, it looks great and I saw no errors.

nice Work
Regards
Tony

Peter Buyze

unread,
Apr 22, 2020, 12:58:59 AM4/22/20
to TiddlyWiki forum
Anne-Laure,

1st impression.
Looks good, and you have the ability to simplify the complex, as Riya Pabari wrote :-)
You gave me an idea.

There are a few spelling mistakes. Also, the VS Code link links to Hyper.



22 Apr 2020, 05:53 by alec...@gmail.com:
Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mat

unread,
Apr 22, 2020, 1:29:38 AM4/22/20
to TiddlyWiki
Don't miss out that you can use single file TW to generate static wikis too, which is much simpler:
  1. Open advanced search, select the Filter tab
  2. Type in "[list[$:/StoryList]rest[]]"
  3. Click the export button and select Static HTML
This could probably be turned in button to permanently show in some corner.

You can also support this proposal: Export panel, including Export current story #1687

<:-)

Xavier Cazin

unread,
Apr 22, 2020, 3:17:01 AM4/22/20
to tiddl...@googlegroups.com
Hi Anne-Laure,

I liked this tutorial very much, in good part because you addressed a concern that I shared with Eric Shulman: the risk of oversimplifying the documentation of a tool that is complex because it allows to create complex documents. Your step-by-step approach to reach a clear, if ambitious, goal, is very convincing.

One point deserves to be clarified, though: why would one want to generate static pages in the first place? The main reason to me is to help indexing by search engines, but maybe there are more (the "read-only" effect is arguable by the way: unless a user is explicitly allowed to save, changes by visitors always happen on a copy of the source TiddlyWiki).

Santé !
-- Xavier Cazin


On Wed, Apr 22, 2020 at 4:53 AM Anne-Laure Le Cunff <alec...@gmail.com> wrote:
Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!

--

Anne-Laure Le Cunff

unread,
Apr 22, 2020, 5:21:27 AM4/22/20
to TiddlyWiki
Thanks so much, everyone!
  • Typos: fixed (hopefully)
  • Link to VS Code: fixed
  • Why a static website: added
  • Example of static website: added
@Mat, I tried the Advanced Search technique (thank you!) but it didn't work for me, see screenshot attached. If it works, that's a much easier way to go about it!

On Wednesday, April 22, 2020 at 8:17:01 AM UTC+1, Xavier wrote:
Hi Anne-Laure,

I liked this tutorial very much, in good part because you addressed a concern that I shared with Eric Shulman: the risk of oversimplifying the documentation of a tool that is complex because it allows to create complex documents. Your step-by-step approach to reach a clear, if ambitious, goal, is very convincing.

One point deserves to be clarified, though: why would one want to generate static pages in the first place? The main reason to me is to help indexing by search engines, but maybe there are more (the "read-only" effect is arguable by the way: unless a user is explicitly allowed to save, changes by visitors always happen on a copy of the source TiddlyWiki).

Santé !
-- Xavier Cazin


On Wed, Apr 22, 2020 at 4:53 AM Anne-Laure Le Cunff <alec...@gmail.com> wrote:
Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
Screenshot 2020-04-22 at 10.20.16 AM.png

Mat

unread,
Apr 22, 2020, 5:29:50 AM4/22/20
to TiddlyWiki
Anne-Laure Le Cunff wrote:
@Mat, I tried the Advanced Search technique (thank you!) but it didn't work for me, see screenshot attached. If it works, that's a much easier way to go about it!

You need to be on the "Filter" tab. You're on the "System" tab, which only filters among system tiddlers (i.e tiddlers prefixed $:/)

<:-)

Anne-Laure Le Cunff

unread,
Apr 22, 2020, 5:35:47 AM4/22/20
to TiddlyWiki
Oops! :)

1. Still not working, it's only displaying one random Tiddler (see attached)
2. Am I right this would export one file called tiddlers.html with everything that's filtered in it, rather than multiple pages with one html page = 1 tiddler?

Thank you!
Screenshot 2020-04-22 at 10.34.03 AM.png

Birthe C

unread,
Apr 22, 2020, 5:47:08 AM4/22/20
to TiddlyWiki
Now that your screenshot show Tiddlyblink I wonder. The serch will only find, what is open in the story.

Mat

unread,
Apr 22, 2020, 5:48:33 AM4/22/20
to TiddlyWiki
Anne-Laure Le Cunff wrote:

First, I just realized this is a better filter - the previous one removed the first tiddler which isn't always the Search tiddler, so this one specifically only removes that one:

[list[$:/StoryList]] -$:/AdvancedSearch

 
1. Still not working, it's only displaying one random Tiddler (see attached)

It is supposed to display all tiddlers that you currently have open. Is this not the case?

 
2. Am I right this would export one file called tiddlers.html with everything that's filtered in it, rather than multiple pages with one html page = 1 tiddler?

Yes.

<:-)

Mat

unread,
Apr 22, 2020, 5:50:38 AM4/22/20
to TiddlyWiki
2. Am I right this would export one file called tiddlers.html with everything that's filtered in it, rather than multiple pages with one html page = 1 tiddler?

Yes.

To clarify: it filters all open tiddlers. But you can make any filter e.g "[tag[foo]]" or where a date is "greaterthan" some cutoff or whatever - and have all those exported as one page.

<:-)

Anne-Laure Le Cunff

unread,
Apr 22, 2020, 5:57:25 AM4/22/20
to TiddlyWiki
Thank you! So it does perform something different from what I'm doing in the tutorial—everything as one page rather than all existing tiddlers as separate (but interlinked) pages. For a static website, I think it's better to have one page = one tiddler, but good to know there's also this quick option!

Mat

unread,
Apr 22, 2020, 6:04:18 AM4/22/20
to TiddlyWiki
Anne-Laure Le Cunff wrote:
Thank you! So it does perform something different from what I'm doing in the tutorial—everything as one page rather than all existing tiddlers as separate (but interlinked) pages.

Ah, that's an interesting distinction. You might want to propose this as an export option or try to implement it yourself. It should not be overly difficult... a button containing a listwidget with the filter that executes the export for each item...

<:-)

Mat

unread,
Apr 22, 2020, 6:12:15 AM4/22/20
to TiddlyWiki
Anne-Laure Le Cunff wrote:
For a static website, I think it's better to have one page = one tiddler, but good to know there's also this quick option!

Apropos

...I did some experimenting a while back, having multiple tiddlers in a static page but using css tricks to only show specific tiddlers per user clicks. IMO this is worth exploring further since it is simpler to serve a single file than many, e.g on various free hosting servers.

<:-)

Anne-Laure Le Cunff

unread,
Apr 22, 2020, 6:14:23 AM4/22/20
to TiddlyWiki
Yes that would be fun — but not great for SEO purposes, which is a big advantage of static websites vs native TiddlyWiki :) To make your content easily indexable by search engines you need one page = one piece of content, with its own title, body, and unique metadata. Also, if your wiki is text only, the number of pages doesn't really matter on most free hosting services like GitHub pages or Netlify.

Ste Wilson

unread,
Apr 22, 2020, 2:25:51 PM4/22/20
to TiddlyWiki
Sycom did do an Analytics plugin but it currently causes a red screen of emabarsment as if a few updates ago.

https://sycom.github.io/TiddlyWiki-Plugins/

Mohammad

unread,
Apr 23, 2020, 2:03:47 AM4/23/20
to TiddlyWiki
Great tutorial. Thank you Anne-Laure.

Good to note somewhere, this procedure do not produce static page from some wikitext elements like tabs, tagpills, ...

Hope to see more Tiddlywiki stuff from you.

Best wishes
Mohammad

Mohammad

unread,
Apr 25, 2020, 10:53:35 AM4/25/20
to tiddl...@googlegroups.com
Hi Anne-Laure,
 
On Wednesday, April 22, 2020 at 7:23:38 AM UTC+4:30, Anne-Laure Le Cunff wrote:
Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!

I just read the whole tutorial! one comment:

In 2. Export your TiddlyWiki as a static website

You have asked to copy paste some commands in terminal and run one by one or create a setup.sh to make the static website BUT

When you create your wiki using 

tiddlywiki myfirstwiki --init server


Tiddlywiki creates a tiddlywiki.info in myfirstwik folder, you can use it like below

tiddlywiki myfirstwiki --build static


and it does all the magic and no need for those headaches! specially if this targets beginners.

Cheers
Mohammad

Anne-Laure Le Cunff

unread,
Apr 25, 2020, 11:28:13 AM4/25/20
to TiddlyWiki
Hi Mohammad,

Thank you! I just tried it and get the attached error, am I doing something wrong?

Am I correct to do this in the root folder of the wiki?

Thank you!
build-tw-cl.png

Mohammad

unread,
Apr 25, 2020, 11:46:30 AM4/25/20
to TiddlyWiki
Hi Anne-Laure
If you run the code from root folder of wiki, just type as below

tiddlywiki --build static


--Mohammad

Anne-Laure Le Cunff

unread,
Apr 26, 2020, 9:32:25 AM4/26/20
to TiddlyWiki
Oh, thank you, it worked!

Curious what these much complex steps in the official documentation bring to the table?

Jeffrey Honeycutt

unread,
Apr 26, 2020, 5:00:57 PM4/26/20
to TiddlyWiki
Anne-Laure - I love your work on this - I have a few missing pieces, especially when "taking it to the next level"...

Constructive criticism, turned into a question, then an attempted demo of TW5 -> static website...

Terminal commands display incorrectly
  • The font used to display the terminal command instructions smashes a - - double dash (no space between) into a single slightly longer dash, which makes the terminal command inoperable
Single TW5.html vs. Node.js
  • I need to know the Pros and Cons of having a single TW5.html file versus deploying TW5 as a bunch of files using Node.js
  • I am particularly interested in the sustainment of a specific process (ALLeCunff calls it "taking it to the next level")
My ideal use case:
  • I keep (almost) all my wiki data in a growing single TW5.html file (currently over 20 Mbytes). Images and audio files are external calls. This master file contains private data as well as stuff I would like to post on my blog.
  • I would like to do all my editting and updating in this "master wiki" which I access via TiddlyDesktop.
  • Any tiddler that I want seen on my blog gets tagged "Public".
  • With as little effort as possible (after setup), I would like my personal gitHub repository to have the tiddlers (tagged Public) available for viewing.
  • Big Bonus for ability to register visitors and grant selective permission to access topics (an AirBnb treehouse in Costa Rica, a medical journal club, an entrepreneurship venture in development...)

Link re: Progress so far

Jeffrey Honeycutt

unread,
Apr 26, 2020, 5:05:21 PM4/26/20
to TiddlyWiki
Obviously, I do not know how to add a TW5.html wiki on Google Groups, 

so here it is (I hope): 

Anne-Laure Le Cunff

unread,
Apr 26, 2020, 7:22:43 PM4/26/20
to tiddl...@googlegroups.com
Thanks Jeffrey!
  • Dashes — I fixed these about ten hours ago, way before you posted this message, are you sure that's still the case or were you maybe drafting this for a while?
  • You can use TW5.html or TW Node.js for your personal wiki, but if you want to use TW as a static website generator you need to use the Node.js version.
  • I can't comment on your ideal use case as it's quite out of scope, but I hope you found the tutorial useful nonetheless, and really appreciate the feedback!
The only bit I'm confident about is tagging your posts "public" and only exporting that, it would look something like this:

tiddlywiki --rendertiddlers [!is[system]tag[public]] $:/core/templates/static.tiddler.html static text/plain

Jeffrey Honeycutt

unread,
Apr 27, 2020, 12:00:03 AM4/27/20
to TiddlyWiki
:.butler @@color:navy;"You can use TW5.html or TW Node.js for your personal wiki, but if you want to use TW as a static website generator you need to use the Node.js version."@@

After my prior post, I messed up the link to my personal blog hosted on GitHub (this wiki).

I found [[Eric Shulman's|EShulman]] comment elsewhere: 

:.shadowbox """

If all you want to do is "serve tiddlywiki files"... then it is really no different than hosting any other regular HTML file on the server.  Without adding any additional server-side scripts (which could impact on existing security protocols), you would simply upload an HTML file to the server using whatever method is currently in place and approved by the University.

The entire uploaded TW is then simply delivered to the brower just like any other HTML file, and the javascript executes completely within the client-side browser, which runs in a locked-down sandbox environment that is not permitted to peform local file I/O.

The user CAN make changes in the TW and save them to a **local file** by using the default "download saver".  However, this does NOT create anything new *on the server* and opening the locally-saved TW file will still be secure since it is locked-down in the browser's sandbox environment."""

;So I 

*Created an empty.html and added the tiddlers from my master wiki using the advanced search filter `[tag[Public]]` and selected the JSON file option from the dropdown list 

*Saved "empty.html" using TiddlyDesktop (only save mechanism I am really comfortable with), and renamed the file "index.html"

*Uploaded it to my personal GitHub repository (that auto-publishes)

And it worked.

This is all done without Node.js, which I take to mean it is "Client side" only. 

So I remain confused why I need Node.js, and the Terminal commands at all.

Maybe this will matter when I inevitably want to add a guest registration, commenting system, etc...

JWHoneycutt 

ps. updated my site: https://jwhoneycutt.github.io - to see if I can make the wiki track the updates

Jeffrey Honeycutt

unread,
Apr 27, 2020, 12:06:00 AM4/27/20
to TiddlyWiki
Maybe I do not understand what a "generator" accomplishes


Anne-Laure Le Cunff

unread,
Apr 27, 2020, 4:29:35 AM4/27/20
to TiddlyWiki
Your method generates one file, which is your TiddlyWiki, correct? It's not a static website generator, it's just TiddlyWiki out of the box. You are basically hosting your instance of TiddlyWiki online, which is great but not what this tutorial is about.

Compare this with what you accomplished and you will see the difference.

Also attached a screenshots of the files that get generated by the static website method. Again, compare to your TiddlyWiki file.

Last example:
  1. TiddlyWiki.com is created with the method you used
  2. TiddlyWiki.com/static is created with the static website generator
I hope that helps.
screenshot-static-files.png

C. Wess Daniels

unread,
Apr 29, 2020, 10:07:53 PM4/29/20
to TiddlyWiki
HI all,

I've been trying to get this to work but am running into a couple issues and am hoping to get some help. I really want to get this to work right.

I'm on a Mac and am trying to upload to github. 
I can get all the way through #1 of the tutorial with no issue (so far as I can tell).

In section two I run into an error with the first line of code in terminal (I also seem to be having permissions issues so needing to use SUDO:

tiddlywiki --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain

It won't accept it. I found on the forum this alternative but and by using this it allows me to proceed.

tiddlywiki --rendertiddlers "[tag[live]]" $:/core/templates/static.tiddler.html static text/plain

Is this right? Would this create any kind of issue?

The second issue is that the only file inside myfirstwiki/output/static/ folder is the /static.css. My static.html is outside the folder. (see attatched)

I went ahead and uploaded both files to github just to see and I don't get anything. 

Can you tell what's going on or what I'm doing wrong? Thank you! 

Wess
Screen Shot 2020-04-29 at 10.01.16 PM.png

TonyM

unread,
Apr 30, 2020, 4:14:55 AM4/30/20
to TiddlyWiki
JWHoneycutt ,

Slightly off topic "Generating single File Tiddlywiki's for publishing"

Another approach for you to "generate" a tiddlywiki to save in a public location from you master personal wiki is the reasonably new Innerwiki plugin. You can determine which tiddlers in the current wiki will be in the new one, including all of them, but in this case just those to display the blog and its content, will be delivered to the innerwiki. The innerwiki plugin uses a data widget to set the tiddlers to use. Once the wiki is generated in the window, you can click in side it and save it out to a new single html file wiki and overwrite the previous one. 

This could become a very powerful wiki generator if one desired.

back to static html files

All I want from a static HTML generator is to generate a separate html page for every tiddler, such as when you cliclk in a link it loaded the full Tiddlywiki, thus supporting speed, SEO and yet using tiddlywikis interactive build. Has any one done this?

Regards
Tony

Saq Imtiaz

unread,
Apr 30, 2020, 4:31:40 AM4/30/20
to TiddlyWiki
Wess:
  • what operating system are you using?
  • what is the output of
    tiddlywiki --version

  • what is the exact error message when you run tiddlywiki --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain

Saq Imtiaz

unread,
Apr 30, 2020, 4:45:52 AM4/30/20
to tiddl...@googlegroups.com
Tony: what you want is basically tiddlywiki.com (and it's static site), that is follow the process to render a static site with the default templates, but with the url's tweaked to be peramlinks to the same tiddler on the tiddlywiki.

Search for tv-wikilink-template on tiddlywiki.com and check out the tiddlywiki.com edition static build target on Github  as well. Otherwise the guides posted on the forums should be what you need.

TonyM

unread,
Apr 30, 2020, 5:45:20 AM4/30/20
to TiddlyWiki
Thanks saq, tony

Jeremy Ruston

unread,
Apr 30, 2020, 5:51:05 AM4/30/20
to TiddlyWiki
Hi Anne-Laure

Curious what these much complex steps in the official documentation bring to the table?

The “build” command lets you store named sequences of commands and invoke them with a single command, making it easier to type common commands.

The build targets are defined in the tiddlywiki.info in the root of the wiki folder like this:

{
"description": "Empty edition",
"plugins": [
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"build": {
"index": [
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
"empty": [
"--rendertiddler","$:/core/save/all","empty.html","text/plain",
"--rendertiddler","$:/core/save/all","empty.hta","text/plain"],
"externalimages": [
"--savetiddlers","[is[image]]","images",
"--setfield","[is[image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
"--setfield","[is[image]]","text","","text/plain",
"--rendertiddler","$:/core/save/all","externalimages.html","text/plain"],
"static": [
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
}
}

Those commands could be performed like this:

tiddlywiki mywiki --build index empty static

Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f6415eef-fb87-4c09-a2a6-72a706a2cdff%40googlegroups.com.

Mohammad

unread,
Apr 30, 2020, 9:34:41 AM4/30/20
to TiddlyWiki

Mohammad

unread,
Apr 30, 2020, 9:53:13 AM4/30/20
to TiddlyWiki
Hi Jeremy,
 The build command is quite powerful! I appreciate to advice on below questions

  1. In https://tiddlywiki.com/#RenderTiddlerCommand it states that "The --rendertiddler command is deprecated in favor of the new, more flexible --render command". this is true for "--rendertiddlers", but when one create a new wiki using "tiddlywiki mywiki --init server" even in TW-5.1.22 you get your tiddlywiki.info uses old commands. What do you recommend here?
  2. Is it possible to use "--render" and use "filename-filter" to remove space and odd characters (e.g. / [ " % $) from tiddler name and store in a specific folder for example ./blog, ./asset, ...
  3. Most problematic one: Is there any way to use --render and prevent the extra <p> tag generation? I use a grid layout for static website generated by TW-5.1.22 and these <p> tags make to destroy the grid layout.
Many thanks for your help
--Mohammad

C. Wess Daniels

unread,
Apr 30, 2020, 11:47:16 AM4/30/20
to TiddlyWiki
Saq -

Thanks for the response.

- Catalina
- 5.1.22
- zsh: event not found: is[system]]

Does that help?

Wess
Message has been deleted

Saq Imtiaz

unread,
Apr 30, 2020, 11:57:14 AM4/30/20
to TiddlyWiki
Wess,

Try to run this:
path+=('~/.npm-global/bin')

I suspect npm isn't on your PATH

And then re-run the TiddlyWiki command

Jeremy Ruston

unread,
Apr 30, 2020, 12:19:32 PM4/30/20
to TiddlyWiki
Hi Mohammad
  1. In https://tiddlywiki.com/#RenderTiddlerCommand it states that "The --rendertiddler command is deprecated in favor of the new, more flexible --render command". this is true for "--rendertiddlers", but when one create a new wiki using "tiddlywiki mywiki --init server" even in TW-5.1.22 you get your tiddlywiki.info uses old commands. What do you recommend here?
We should update the examples here. There’s nothing wrong with rendertiddlers beyond that it isn’t as flexible.

  1. Is it possible to use "--render" and use "filename-filter" to remove space and odd characters (e.g. / [ " % $) from tiddler name and store in a specific folder for example ./blog, ./asset, ...
The filename filter parameter is used to transform the tiddler title into a filename, and so you could indeed use a regexp to remove those characters. I think you’re probably after the “slugify” operator discussed here: https://github.com/Jermolene/TiddlyWiki5/issues/3379#issuecomment-411401582

  1. Most problematic one: Is there any way to use --render and prevent the extra <p> tag generation? I use a grid layout for static website generated by TW-5.1.22 and these <p> tags make to destroy the grid layout.
I assume your render command is outputting to text/html format? If so, and your current template is $:/mytemplate, try adding a new template called $:/mytemplate-wrapper containing the content below:

<$view mode="htmlwikified" mode="inline"/>

And then render the new $:/mytemplate-wrapper template with the output type set to text/plain.

Best wishes

Jeremy.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mohammad

unread,
Apr 30, 2020, 12:59:54 PM4/30/20
to TiddlyWiki
Hi Jeremy
 Many thanks for calcification! I will go through your advises and make some experiments and will share the results here!
 I will also sub,it a ticked for updating the official tiddlywiki.info files!

Best wishes
-- Mohammad



On Thursday, April 30, 2020 at 8:49:32 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad
  1. In https://tiddlywiki.com/#RenderTiddlerCommand it states that "The --rendertiddler command is deprecated in favor of the new, more flexible --render command". this is true for "--rendertiddlers", but when one create a new wiki using "tiddlywiki mywiki --init server" even in TW-5.1.22 you get your tiddlywiki.info uses old commands. What do you recommend here?
We should update the examples here. There’s nothing wrong with rendertiddlers beyond that it isn’t as flexible.

  1. Is it possible to use "--render" and use "filename-filter" to remove space and odd characters (e.g. / [ " % $) from tiddler name and store in a specific folder for example ./blog, ./asset, ...
The filename filter parameter is used to transform the tiddler title into a filename, and so you could indeed use a regexp to remove those characters. I think you’re probably after the “slugify” operator discussed here: https://github.com/Jermolene/TiddlyWiki5/issues/3379#issuecomment-411401582

  1. Most problematic one: Is there any way to use --render and prevent the extra <p> tag generation? I use a grid layout for static website generated by TW-5.1.22 and these <p> tags make to destroy the grid layout.
I assume your render command is outputting to text/html format? If so, and your current template is $:/mytemplate, try adding a new template called $:/mytemplate-wrapper containing the content below:

<$view mode="htmlwikified" mode="inline"/>

I use the standard tiddlywiki.info generated by "tiddlywiki mywiki --init server" but I have overwritten the core template (I will use my own later)
I have copy pasted the static part from my tiddlywiki.info
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

C. Wess Daniels

unread,
Apr 30, 2020, 1:25:04 PM4/30/20
to TiddlyWiki
Saq -

Okay I ran:

path+=('~/.npm-global/bin')

Then deleted "myfirstwiki" folder and reinstalled everything (in Anne-Laure's first section).

I then ran the command:

tiddlywiki --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain

And am still getting the same error: zsh: event not found: is[system]]?

Should I just go through the rest of the steps anyway using that other line of code? with "[tag[live]]" or is there something else I should do?

Cheers,
Wess

Wess

BurningTreeC

unread,
May 1, 2020, 3:54:55 AM5/1/20
to TiddlyWiki

Saq -

Okay I ran:

path+=('~/.npm-global/bin')

Then deleted "myfirstwiki" folder and reinstalled everything (in Anne-Laure's first section).

I then ran the command:

tiddlywiki --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain

And am still getting the same error: zsh: event not found: is[system]]?

As it says, this is a zsh error. It interprets [!is[system]] as a SHELL command...

Does it work if you use "[!is[system]]" instead (note the quotes)?

Mohammad

unread,
May 1, 2020, 4:03:58 AM5/1/20
to TiddlyWiki


On Thursday, April 30, 2020 at 8:49:32 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad
  1. In https://tiddlywiki.com/#RenderTiddlerCommand it states that "The --rendertiddler command is deprecated in favor of the new, more flexible --render command". this is true for "--rendertiddlers", but when one create a new wiki using "tiddlywiki mywiki --init server" even in TW-5.1.22 you get your tiddlywiki.info uses old commands. What do you recommend here?
We should update the examples here. There’s nothing wrong with rendertiddlers beyond that it isn’t as flexible.

  1. Is it possible to use "--render" and use "filename-filter" to remove space and odd characters (e.g. / [ " % $) from tiddler name and store in a specific folder for example ./blog, ./asset, ...
The filename filter parameter is used to transform the tiddler title into a filename, and so you could indeed use a regexp to remove those characters. I think you’re probably after the “slugify” operator discussed here: https://github.com/Jermolene/TiddlyWiki5/issues/3379#issuecomment-411401582

  1. Most problematic one: Is there any way to use --render and prevent the extra <p> tag generation? I use a grid layout for static website generated by TW-5.1.22 and these <p> tags make to destroy the grid layout.
I assume your render command is outputting to text/html format? If so, and your current template is $:/mytemplate, try adding a new template called $:/mytemplate-wrapper containing the content below:

<$view mode="htmlwikified" mode="inline"/>

And then render the new $:/mytemplate-wrapper template with the output type set to text/plain.

I confused how to use this new template! Should I use it in tiddlywiki.info like below
"--rendertiddlers","[!is[system]]","$:/mytemplate-wrapper","static","text/plain",
"
 
Or in the $:/core/templates/static.tiddler.html

--Mohammad


Best wishes

Jeremy.

To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Jeremy Ruston

unread,
May 1, 2020, 4:10:06 AM5/1/20
to TiddlyWiki
Hi Mohammad


On 1 May 2020, at 09:03, Mohammad <mohammad...@gmail.com> wrote:

I confused how to use this new template! Should I use it in tiddlywiki.info like below
"--rendertiddlers","[!is[system]]","$:/mytemplate-wrapper","static","text/plain",
"
 
Or in the $:/core/templates/static.tiddler.html

Yes, that’s what I meant: to use the new wrapper template in your rendering commands, and to render to text/plain format.

Best wishes

Jeremy

Mohammad Rahmani

unread,
May 1, 2020, 4:26:02 AM5/1/20
to tiddl...@googlegroups.com
Thanks Jeremy! 

I try this and return to you!

By the way I am working on generating static pages using Tiddlywiki and I had some good progress.
I will then prepare a tutorial with some lessons to be reproducible simply by interested learners!
To this end I see the process is quit easy as far as stick to official tools and get a little tricky when 
you want to use your own page template, css, tags, ...

BUT I should say Tiddlywiki is quite powerful and procedure can be simplified alot to be used even by beginners!

Best
Mohammad

Mohammad

unread,
May 1, 2020, 5:19:46 AM5/1/20
to TiddlyWiki
Hi Jeremy,

No luck to remove the extra <p> nor the new template created correct html page (rendered tiddler --> page.html)

 As you advised I used the below command in my tiddlywiki.info to build the static pages and see the effects of new template: $:/kookma/mytemplate-wrapper

"jeremy":[
    "--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/templates/static.tiddler.html", "static", "text/plain",
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/mytemplate-wrapper", "static", "text/plain",
    "--rendertiddler", "$:/kookma/templates/static.template.css", "static/static.css", "text/plain" 
]

Then in a terminal window I issued the below command

tiddlywiki --build jeremy

I got the output folder with all tiddlers tagged with public BUT the pages are raw texts

For example Home tiddler rendered into home.html with below content

!! Home This is a playground to make static website. !! Links This is an [[Index]]. I also see `a code` here.

As you see nothing rendered!


More info:
  1. My templates are copy of official templates so $:/kookma/templates/static.tiddler.html is a copy of $:/core/templates/static.tiddler.html
  2. I have only used a modified $:/core/ui/ViewTemplate called "$:/kookma/ui/ViewTemplate " to remove the tags wrapper from displaying. So this was reflected in "$:/core/templates/static.tiddler.html"as below
<body class="tc-body">
`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`
<section class="tc-story-river">
`<$view tiddler="$:/kookma/ui/ViewTemplate" format="htmlwikified"/>`
</section>
</body>


Mohammad



Jeremy Ruston

unread,
May 1, 2020, 5:23:17 AM5/1/20
to TiddlyWiki
Hi Mohammad

Apologies, I’d missed a bit off the content of the new wrapper template. Try this:

<$view tiddler="$:/mytemplate" mode="htmlwikified" mode="inline”/>

Where “$:/mytemplate” is the title of the template you were using before (ie the title of the template we’re wrapping).

Best wishes

Jeremy.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/42d7919d-014f-408d-b853-fa5d65c50acd%40googlegroups.com.

Mohammad

unread,
May 1, 2020, 6:23:22 AM5/1/20
to tiddl...@googlegroups.com
Hi Jeremy
 Many thanks and sorry for taking your time.


On Friday, May 1, 2020 at 1:53:17 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad

Apologies, I’d missed a bit off the content of the new wrapper template. Try this:

<$view tiddler="$:/mytemplate" mode="htmlwikified" mode="inline”/>

This seems to be corrected as below

<$view tiddler="$:/mytemplate" format="htmlwikified" mode="inline”/>

 

Where “$:/mytemplate” is the title of the template you were using before (ie the title of the template we’re wrapping).

Best wishes

Jeremy.


The standard template which I modified it a bit, seems have backticks. Following is the standard template for rendering tiddlers with very little modification

\define tv-wikilink-template() $uri_doubleencoded$.html
\define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no
\define tv-config-toolbar-class() tc-btn-invisible
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
`<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="TiddlyWiki" />
<meta name="tiddlywiki-version" content="`{{$:/core/templates/version}}`" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="format-detection" content="telephone=no">
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="static.css">
<title>`<$view field="caption"><$view field="title"/></$view>: {{$:/core/wiki/title}}`</title>
</head>
<body class="hg">
<header class="hg-header">`

{{$:/kookma/static-header||$:/core/templates/html-tiddler}}

`</header>
<main class="hg-main">`
<$view tiddler="$:/kookma/template/static-view-template" format="htmlwikified"/>
`</main>
<aside class="hg-left">
`
{{$:/kookma/aside-left||$:/core/templates/html-tiddler}}
`</aside>
<aside class="hg-right">`
{{$:/kookma/aside-right||$:/core/templates/html-tiddler}}
`</aside>
<footer class="hg-footer">`
{{$:/kookma/static-footer||$:/core/templates/html-tiddler}}
`</footer>
</body>
</html>`

 
When I use the wrapper template in my case "$:/kookma/mytemplate-wrapper" with below content as your advise

<$view tiddler="$:/kookma/templates/static.tiddler.html" format="htmlwikified" mode="inline”/>

I see something like this in Wiki 

<code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;charset=utf-8&quot; /&gt; &lt;meta name=&quot;generator&quot; content=&quot;TiddlyWiki&quot; /&gt; &lt;meta name=&quot;tiddlywiki-version&quot; content=&quot;</code>5.1.22<code>&quot; /&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt; &lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot; /&gt; &lt;meta name=&quot;apple-mobile-web-app-status-bar-style&quot; content=&quot;black-translucent&quot; /&gt; &lt;meta name=&quot;mobile-web-app-capable&quot; content=&quot;yes&quot;/&gt; &lt;meta name=&quot;format-detection&quot; content=&quot;telephone=no&quot;&gt; &lt;link id=&quot;faviconLink&quot; rel=&quot;shortcut icon&quot; href=&quot;favicon.ico&quot;&gt; &lt;link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic' rel='stylesheet' type='text/css'&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;static.css&quot;&gt; &lt;title&gt;</code>$:/kookma/mytemplate-wrapper: Generate Static Website — a tutorial for generate websits using Tiddlywiki<code>&lt;/title&gt; &lt;/head&gt; &lt;body class=&quot;hg&quot;&gt; &lt;header class=&quot;hg-header&quot;&gt;</code> &lt;p&gt;Generate Static Website&lt;/p&gt; <code>&lt;/header&gt; &lt;main class=&quot;hg-main&quot;&gt;</code> &lt;p&gt;&lt;div class=&quot;tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-system &quot; data-tags=&quot;&quot; data-tiddler-title=&quot;$:/kookma/mytemplate-wrapper&quot;&gt;&lt;div class=&quot; tc-reveal&quot; hidden=&quot;true&quot;&gt;&lt;/div&gt; &lt;span class=&quot;tc-error&quot;&gt;Recursive transclusion error in transclude widget&lt;/span&gt; &lt;/div&gt; &lt;/p&gt; <code>&lt;/main&gt; &lt;aside class=&quot;hg-left&quot;&gt; </code> &lt;p&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;ul class=&quot;&quot;&gt;&lt;/ul&gt;&lt;/p&gt; <code>&lt;/aside&gt; &lt;aside class=&quot;hg-right&quot;&gt;</code> &lt;p&gt;Ads&lt;/p&gt; <code>&lt;/aside&gt; &lt;footer class=&quot;hg-footer&quot;&gt;</code> &lt;p&gt;This is a footer&lt;/p&gt; <code>&lt;/footer&gt; &lt;/body&gt; &lt;/html&gt;</code>


And when I build the static pages using

tiddlywiki --build jeremy

with jeremy in my tiddlywiki.info as below

"jeremy":[
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/mytemplate-wrapper", "static", "text/plain",
    "--rendertiddler", "$:/kookma/templates/static.template.css", "static/static.css", "text/plain" 
]

I get the wrong result as below: for example this is home tiddler rendered as home.html

<!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="generator" content="TiddlyWiki" /> <meta name="tiddlywiki-version" content="5.1.22" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="mobile-web-app-capable" content="yes"/> <meta name="format-detection" content="telephone=no"> <link id="faviconLink" rel="shortcut icon" href="favicon.ico"> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="static.css"> <title>Home: Generate Static Website — a tutorial for generate websits using Tiddlywiki</title> </head> <body class="hg"> <header class="hg-header"> <p>Generate Static Website</p> </header> <main class="hg-main"> <p><div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tagged-start tc-tagged-public" data-tags="start public" data-tiddler-title="Home"><div class=" tc-reveal" hidden="true"></div> <div class="tc-tiddler-body tc-reveal"><h2 class="">Home</h2><p>This is a playground to make static website.</p><h2 class="">Links</h2><p>This is an <a class="tc-tiddlylink tc-tiddlylink-resolves" href="./index.html">Index</a>. I also see <code>a code</code> here.</p></div> </div> </p> </main> <aside class="hg-left"> <p><strong>Contents</strong></p><p><ul class=""></ul></p> </aside> <aside class="hg-right"> <p>Ads</p> </aside> <footer class="hg-footer"> <p>This is a footer</p> </footer> </body> </html>


--Mohammad

C. Wess Daniels

unread,
May 1, 2020, 7:48:17 AM5/1/20
to TiddlyWiki
Burning Tree - 

It gives me the same error when I try that way also.

W

BurningTreeC

unread,
May 1, 2020, 8:06:19 AM5/1/20
to TiddlyWiki

Burning Tree - 

It gives me the same error when I try that way also.

Sorry, single quotes like '[!is[system]]'  should work

Anne-Laure Le Cunff

unread,
May 1, 2020, 12:20:39 PM5/1/20
to TiddlyWiki
@Jeremy: thanks so much for explaining the "build" command, makes lots of sense! I created a build.sh file instead as I didn't know there was a native method. Really cool.

@Wess: I'm not sure what's going wrong but hopefully '[!is[system]]' will work for you.

@Burning Tree: Is what's happening to Wess common? Wondering if I should the command to '[!is[system]]' in the tutorial. Thank you!

BurningTreeC

unread,
May 2, 2020, 1:30:12 AM5/2/20
to TiddlyWiki

@Jeremy: thanks so much for explaining the "build" command, makes lots of sense! I created a build.sh file instead as I didn't know there was a native method. Really cool.

@Wess: I'm not sure what's going wrong but hopefully '[!is[system]]' will work for you.

@Burning Tree: Is what's happening to Wess common? Wondering if I should the command to '[!is[system]]' in the tutorial. Thank you!

'[!is[system]]'  works for both bash and zsh, while [!is[system]] doesn't work for zsh... some users (like me) use zsh as their default shell, so maybe it's better to update the docs :)

Jeremy Ruston

unread,
May 2, 2020, 8:32:30 AM5/2/20
to TiddlyWiki
Hi BurningTreeC

On 2 May 2020, at 06:30, BurningTreeC <hypnotize...@gmail.com> wrote:

'[!is[system]]'  works for both bash and zsh, while [!is[system]] doesn't work for zsh... some users (like me) use zsh as their default shell, so maybe it's better to update the docs :)

This has indeed tripped up a couple of people recently, might you be able to put together a PR?

Many thanks,

Jeremy

Jeremy Ruston

unread,
May 2, 2020, 8:47:49 AM5/2/20
to TiddlyWiki
Hi Mohammad

Not at all, my apologies for posting a response without properly testing it. I’m now very confused about what the original problem was, please could you kindly restate the problem, ideally with reference to the existing core templates?

Best wishes

Jeremy



On 1 May 2020, at 11:23, Mohammad <mohammad...@gmail.com> wrote:

Hi Jeremy
 Many thanks and sorry for taking your time.

On Friday, May 1, 2020 at 1:53:17 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad

Apologies, I’d missed a bit off the content of the new wrapper template. Try this:

<$view tiddler="$:/mytemplate" mode="htmlwikified" mode="inline”/>

This seems to be corrected as below

<$view tiddler="$:/mytemplate" format="htmlwikified" mode="inline”/>

 

Where “$:/mytemplate” is the title of the template you were using before (ie the title of the template we’re wrapping).

Best wishes

Jeremy.


The standard template which I uses a modified one seems have backticks. Following is the standard template for rendering tiddlers with very little modification
<$view tiddler="$:/kookma/templates/static.tiddler.html" mode="htmlwikified" mode="inline”/>

I see something like this in Wiki 

<code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;charset=utf-8&quot; /&gt; &lt;meta name=&quot;generator&quot; content=&quot;TiddlyWiki&quot; /&gt; &lt;meta name=&quot;tiddlywiki-version&quot; content=&quot;</code>5.1.22<code>&quot; /&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt; &lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot; /&gt; &lt;meta name=&quot;apple-mobile-web-app-status-bar-style&quot; content=&quot;black-translucent&quot; /&gt; &lt;meta name=&quot;mobile-web-app-capable&quot; content=&quot;yes&quot;/&gt; &lt;meta name=&quot;format-detection&quot; content=&quot;telephone=no&quot;&gt; &lt;link id=&quot;faviconLink&quot; rel=&quot;shortcut icon&quot; href=&quot;favicon.ico&quot;&gt; &lt;link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic' rel='stylesheet' type='text/css'&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;static.css&quot;&gt; &lt;title&gt;</code>$:/kookma/mytemplate-wrapper: Generate Static Website — a tutorial for generate websits using Tiddlywiki<code>&lt;/title&gt; &lt;/head&gt; &lt;body class=&quot;hg&quot;&gt; &lt;header class=&quot;hg-header&quot;&gt;</code> &lt;p&gt;Generate Static Website&lt;/p&gt; <code>&lt;/header&gt; &lt;main class=&quot;hg-main&quot;&gt;</code> &lt;p&gt;&lt;div class=&quot;tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-system &quot; data-tags=&quot;&quot; data-tiddler-title=&quot;$:/kookma/mytemplate-wrapper&quot;&gt;&lt;div class=&quot; tc-reveal&quot; hidden=&quot;true&quot;&gt;&lt;/div&gt; &lt;span class=&quot;tc-error&quot;&gt;Recursive transclusion error in transclude widget&lt;/span&gt; &lt;/div&gt; &lt;/p&gt; <code>&lt;/main&gt; &lt;aside class=&quot;hg-left&quot;&gt; </code> &lt;p&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;ul class=&quot;&quot;&gt;&lt;/ul&gt;&lt;/p&gt; <code>&lt;/aside&gt; &lt;aside class=&quot;hg-right&quot;&gt;</code> &lt;p&gt;Ads&lt;/p&gt; <code>&lt;/aside&gt; &lt;footer class=&quot;hg-footer&quot;&gt;</code> &lt;p&gt;This is a footer&lt;/p&gt; <code>&lt;/footer&gt; &lt;/body&gt; &lt;/html&gt;</code>


And when I build the static pages using

tiddlywiki --build jeremy

with jeremy in my tiddlywiki.info as below

"jeremy":[
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/mytemplate-wrapper", "static", "text/plain",
    "--rendertiddler", "$:/kookma/templates/static.template.css", "static/static.css", "text/plain" 
]

I get the wrong results as below: for example this is tutorial tiddler rendered as tutorial.html

<!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="generator" content="TiddlyWiki" /> <meta name="tiddlywiki-version" content="5.1.22" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="mobile-web-app-capable" content="yes"/> <meta name="format-detection" content="telephone=no"> <link id="faviconLink" rel="shortcut icon" href="favicon.ico"> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="static.css"> <title>Tutorials: Generate Static Website — a tutorial for generate websits using Tiddlywiki</title> </head> <body class="hg"> <header class="hg-header"> <p>Generate Static Website</p> </header> <main class="hg-main"> <p><div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tagged-public" data-tags="public" data-tiddler-title="Tutorials"><div class=" tc-reveal" hidden="true"></div> <div class="tc-tiddler-body tc-reveal"><h2 class="">Part i</h2><p>URLs - the strings of letters and symbols that we occasionally type into the address bar but much more frequently click on, aren't allowed to have spaces in them.</p><p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAB2AAAAdgB+lymcgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABGRSURBVHiczZt5XJXVuse/74bN3swioigOiAyiOKaGndAcciLHUstjlh+10+1a2W2w4dx763RPne61OudUmpWpDZqd6tjgVJoTziiIoiAgCA6AyIyw2cM6f6x3j2xwq0D39/m8n/2u933WetfzrOmZNtw65gENgHC5qoHf3Ua77Qrv26h7H6ALDgrG28sLgEZjIzW1tYHAROBAK/SvzXE7AogBeHrJkwQFBgGQV5DHqnWrAfrcftfaB5oW3vUCtgDPN0MX7aP1E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cFulpk+O0NZDZaKPLPXAPiomNRUMjKlYqEoij0iezDrOQZdO7UGSEEm7d9z4mMNKGueQL8AxgQn8Dh40cQQhiReUI/QfsLwIp3gGdGjUxi2sSpCCGoqavh+20/cDIzA+BV7HaIFWHIGWTNCcoEvkPq9t2TEpOYNG4iF4ou8NFnH4Nc698iY5qL1DpGZB7j923Hmmfoieoy69W9pxgxZLgI7xxudWUV0rzvrjOwFWmbWHN3hwAiPjZevPrCf4lZyTOt7fzVod5cpMb4m/8/wRGDkX+odPT1pQB9b7KdQEB4e3uLkOAQ4efra21raWt2tq2gQTo2pyAtyFtdkttxFmQ50v93Q/wLsCVbVFqZ9RsAAAAASUVORK5CYII=">.</p><p>This is a figure </p><p>Up until now, we have been creating tiddlers, and having them turned into pages with matching URLs without worrying about whether the titles had spaces in them. How come?</p><p>There's actually been a little bit of magic going on all along, which is that tiddlywiki is turning the links to all our pages, along with the filenames that those pages are getting saved with, into 'safe' URLs by swapping all the spaces for the character sequence %20. This is called URL encoding.</p><h2 class="">Part ii</h2><p>This is part two. It contains the below text. </p><blockquote class="tc-quote"><cite>Mark Twain</cite><p>They did not know it was impossible so they did it. </p></blockquote></div> </div> </p> </main> <aside class="hg-left"> <p><strong>Contents</strong></p><p><ul class=""></ul></p> </aside> <aside class="hg-right"> <p>Ads</p> </aside> <footer class="hg-footer"> <p>This is a footer</p> </footer> </body> </html>



--Mohammad


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mohammad

unread,
May 2, 2020, 9:28:58 AM5/2/20
to TiddlyWiki
Hi Jeremy,
 Sure, I create a new thread and restate the issue with reference and summary to this thread!

Best wishes
Mohammad


On Saturday, May 2, 2020 at 5:17:49 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad

To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Mohammad

unread,
May 2, 2020, 10:24:30 AM5/2/20
to TiddlyWiki
Hi Jeremy,
 I have summarized the issue and posted in an new thread!



Best
Mohammad


On Saturday, May 2, 2020 at 5:17:49 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad

To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Anne-Laure Le Cunff

unread,
May 2, 2020, 3:37:33 PM5/2/20
to TiddlyWiki
Done, thank you!

Mohammad

unread,
May 3, 2020, 12:51:25 AM5/3/20
to TiddlyWiki
Anne-Laure

Still part 2. Export your TiddlyWiki as a static website can be simplified
no need to enter those commands in the terminal! You have already them in your tiddlywiki.info!

-Mohammad

Anne-Laure Le Cunff

unread,
May 3, 2020, 7:13:03 AM5/3/20
to TiddlyWiki
Thanks Mohammad! Just want to confirm this would not throw the zsh error Wess got?

Saq Imtiaz

unread,
May 3, 2020, 7:44:32 AM5/3/20
to TiddlyWiki
@Mohammad @Anne-Laure :

Note that you can only use the
--build static

command if you are either using the default templates for a static site, or have edited those template shadow tiddlers, or have updated tiddlywiki.info to use your own templates for the static command.

If anything, I would be more wary of having inexperienced users editing the tiddlywiki.info file.

Regards,
Saq

Mohammad

unread,
May 3, 2020, 11:07:05 AM5/3/20
to TiddlyWiki
@Anne-Laure
As Saq clarified here, when you are on Node.JS just use what Saq recommended. You have it out of the box!
Even for Wess you do not need to write those commands in the terminal!

@Saq
Many thanks for clarification!

Cheers
Mohammad

C. Wess Daniels

unread,
May 3, 2020, 7:55:27 PM5/3/20
to TiddlyWiki
Hi all,

I have made progress! Thanks for all the help.

The single quotes worked like a charm and so now my static folder has all the goodies in it (but it is still not working on final upload). Here my screenshots:

Here’s the output of the index.html when I double-click from the folder.

And this is what I have in my GitHub now.

However, it is still giving me a 404 error. Any thoughts what is keeping this back?


Any ideas on what I need to do to get this to go public? Or what I may be doing wrong?

Thank you for your help,
Wess


On Tuesday, April 21, 2020 at 10:53:38 PM UTC-4, Anne-Laure Le Cunff wrote:
Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!

Anne-Laure Le Cunff

unread,
May 4, 2020, 3:26:02 AM5/4/20
to TiddlyWiki
It's working for me! I think weirdly Github Pages requires an index.html file and not Index.html in the root folder to detect it automatically.

Anne-Laure Le Cunff

unread,
May 4, 2020, 3:27:31 AM5/4/20
to TiddlyWiki
Also, in case you missed it, there is a much simpler way to export your website as this weekend. Tutorial here.

Florian Cauvin

unread,
May 4, 2020, 5:42:07 AM5/4/20
to TiddlyWiki
On Wednesday, April 22, 2020 at 5:53:38 AM UTC+3, Anne-Laure Le Cunff wrote:
> Hi everyone — here is a short tutorial to use TiddlyWiki as a static website generator. Would love any feedback or suggestions. Thank you!

Nice to see a very well written article on this 👍. Well done! Now a small criticism though 😉... the guide is indeed very detailed... until the critical part when it gets hand-wavy telling you'll simply just have to play with core/template/static.tiddler.html. But as far as I know, static.tiddler.html is calling several macros and transfusions, for example with core/ui/ViewTemplate to render the tiddlers, which itself pulls all sort of stuff too contained in other shadow tiddlers. And that's really the point where it actually gets hard to get the static site you want... or am I missing something?

Anne-Laure Le Cunff

unread,
May 4, 2020, 7:53:01 AM5/4/20
to TiddlyWiki
I guess the tutorial is about generating a website, not customising it, which would be a separate tutorial :)

Florian Cauvin

unread,
May 4, 2020, 1:50:40 PM5/4/20
to TiddlyWiki
> I guess the tutorial is about generating a website,
> not customising it, which would be a separate tutorial :)

Fair enough. Although, generating a static site could actually be summarized in just three words: 'tiddlywiki --build static'

Customizing that process so that it splits the markup you wish, well, I gonna wait for (or I'm gonna write) a tutorial for that. Markup currently being generated is full of invisible buttons, etc.

Anne-Laure Le Cunff

unread,
May 5, 2020, 7:39:39 AM5/5/20
to TiddlyWiki
Yes, you can either create a site.sh file with your own commands and type './site.sh' (which is what I did) or edit the tiddlywiki.info file so it does what you want when you type 'tiddlywiki --build static' - I don't think one is more work than the other.

This is a good resource for customising the output if you didn't find it before.

David Gifford

unread,
May 14, 2020, 5:10:18 PM5/14/20
to tiddl...@googlegroups.com
Question: I created the build.sh file and put it in the root folder. Now, in the command prompt, where do I need to be to type ./build.sh? still while I am in tiddlywiki --server? or after I ctrl-C and y?

I get

'.' is not recognized as an internal or external command,
operable program or batch file.

Brandon Hall

unread,
May 14, 2020, 7:53:17 PM5/14/20
to TiddlyWiki
After you do ctrl-C and are back at a clear prompt.
Reply all
Reply to author
Forward
0 new messages