Html Export

220 views
Skip to first unread message

tobaisch

unread,
Dec 1, 2017, 5:01:10 PM12/1/17
to tiddl...@googlegroups.com
Hello,
short question:
Is there a way to change the Html Export Settings?
I don't like to export all my Tiddler-links & my TAG-Pills on the top of the tiddler.
Maybe, there is a export template to change it.
Regards
Tob

TonyM

unread,
Dec 1, 2017, 8:27:57 PM12/1/17
to TiddlyWiki
Tobaisch,

I recently needed to do the same, I did not bother creating a new exporter but instead edited the exported HTML to Remove the header and some other "imperfections".

Depending on your skills making a new exporter is not too complex, first investigate how an existing one operates, the clone the required tiddlers

Regards
Tony

tobaisch

unread,
Dec 1, 2017, 8:42:49 PM12/1/17
to tiddl...@googlegroups.com
first investigate how an existing one operates,

I tried that really,
but i can not find an extisting exporter or a template.
That's why I ask here in the forum.
Regards
Tob

TonyM

unread,
Dec 1, 2017, 11:58:27 PM12/1/17
to TiddlyWiki
Export Tiddler "Static HTML" not in your tiddler menu?

I hope the whole forum has something to share, 

I may have more info later as well.

Regards
Tony

tobaisch

unread,
Dec 2, 2017, 1:53:18 AM12/2/17
to TiddlyWiki
I just cant find any starting point.
no idea how i could change anything and especially where?
Regards
Tob

RichardWilliamSmith

unread,
Dec 2, 2017, 7:55:10 AM12/2/17
to TiddlyWiki
Hi,

As a starting point, you can try looking at $:/core/templates/static-tiddler - it's including everything that has the tag $:/core/ui/ViewTemplate by default, which is the same tag used to include them in the wiki itself, so you could change that and add your new tag to the pieces of the view template that you want.

In general you can find these system tiddlers using the advanced search menu, but I also find it useful to have a tiddler like this one:

\define setStateTid()
$:/state/systemtags/$(currentTiddler)$
\end

<$list filter="[all[shadows+tiddlers]tags[]prefix[$]]">


<$reveal type="nomatch" state=<<setStateTid>> text="show">
<$button set=<<setStateTid>> setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}}</$button><$link>{{!!title}}</$link>

</$reveal>
<$reveal type="match" state=<<setStateTid>> text="show">

<$button set=<<setStateTid>> setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}</$button><$link>{{!!title}}</$link>
<ol class="tc-toc">


<<list-tagged-draggable tag:"$(currentTiddler)$">>


</ol>
</$reveal>



</$list>

that lets me inspect all of them (I add it to the sidebar and this version also lets me re-order the tags by dragging them, which is especially useful when working with view templates)

Regards,
Richard

tobaisch

unread,
Dec 2, 2017, 12:40:33 PM12/2/17
to TiddlyWiki
Hi Richard,
thank you.
In the files $:/core/templates/static-tiddler respectively.
$:/core/ui/ViewTemplate i find no approach where i could change my exports in such a way that no Tiddler-Links are displayed and that the Tag-Pills in the exported html file can be turned off.
I deleted a little bit something in the files.
Either nothing happens or everything is gone. That does not make sense. :)

*********************
\define frame-classes()
tc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$
\end
\define folded-state()
$:/state/folded/$(currentTiddler)$
\end
<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/popup/tiddler-info">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
</$tiddler></$set></$set>

*******************

I also got the systemtiddlers to the sidebar, as you recommended.
I absolutely do not know what to do with it.
I'm just looking for a way to export to static Html with no Tiddler-Links and Tag-Pills.

Excuse me for my stupidity
I'm just beginning to understand all that new stuff in the Tiddler system.

Regards
Tob

Abraham Samma

unread,
Dec 2, 2017, 12:44:52 PM12/2/17
to TiddlyWiki
I think community members should consider taking up the challenge of creating new kinds of exporters. I for example use TW5 a lot to write draft articles for medium.com. I could very well do with an exporter that exports directly to medium.com

RichardWilliamSmith

unread,
Dec 2, 2017, 4:13:27 PM12/2/17
to TiddlyWiki
Hi Again,

Unfortunately, to do what you want requires you to understand wikitext a bit better. The 'static tiddler' tiddler is using the 'view template' to render the static representation. 'view template' is rendering all the tiddlers that have the tag '$:/tags/ViewTemplate'. The sidebar you added should list those amongst the rest. If you remove the tag from a tiddler, it will cease to be statically rendered but it will also cease to be rendered into the wiki (for example, remove it from $:/core/ui/ViewTemplate/tags and the tag pills will disappear). To change the static export without affecting your own wiki, you need to alter 'static tiddler' to use a different template instead of ''view template", probably by cloning it and changing the references. Good luck.

Regards,
Richard

TonyM

unread,
Dec 2, 2017, 6:39:02 PM12/2/17
to TiddlyWiki
Tobaisch,


I am developing my skills and want to build my own exporters so may build one. 

Can you explain what you want and I will see if I can build one for you?

eg; Export the rendered tiddler text field as a HTML snipit, such that it can be pasted into another HTML page (without header and tags just the text part rendered)
or  Export the rendered tiddler text field as a HTML, such that it a standalone HTML page (without header and tags just the text part rendered)
etc...

PS - in the mean time the tiddler you want to render as html can be designed by you not to include internal links that may interfere with your final product.

Regards
Tony

tobaisch

unread,
Dec 2, 2017, 9:41:16 PM12/2/17
to TiddlyWiki
TonyM,
something more detailed.
my wishes to Santa Claus :)
An exportoption of the tiddler into a simple html file.
The header should simply have the title of the exportet Tiddler in the title
maybe <title>export from mytiddler.html</ title>
But that's not so important because it's easy to change.

The first line of my visible html-file should be the first line of my visible content of my tiddler. So mostly a headline and then the text.
No Tag-Pills, no date-stamp, no links to tiddlers in the text.
Just the visible content of the Tiddler.

For several Tiddlers who are merged together it would be best, if the Tiddlers are merged exactly in the content (start of content Tiddler01 -> content -> end of content Tiddler01 -> start of content Tiddler02 ...)

The export function is currently really good and meaningful.
But sometimes you need another variant.
Regards
Tob

TonyM

unread,
Dec 2, 2017, 10:11:06 PM12/2/17
to TiddlyWiki
OK  Great that gives me something to work with.

Keep in mind you control how a tiddler looks, at least within the text field, so you can choose to use macros and other features that do not show links, tag pills etc...

You could transclude other tiddlers into a master tiddler such that on export they are all within the html body. If you do not depend on special fonts or CSS you can just cut and paste using an editor everything between <body> and </body> once we have an exporter for only the Text part of the HTML render, if I am correct.

Never the less I too would like the ability to export clean HTML Snippets as needed.

Regards
Tony

TonyM

unread,
Dec 3, 2017, 6:00:19 PM12/3/17
to TiddlyWiki
Abraham,

I totally agree. Actually the community providing minimalist and specific additions to tiddlywiki is very powerful because it allows people to use the "blocks" available for their own solutions, and helps avoid clashes between solutions.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages