The proof is in the pudding. Huzah!

/*\
title: $:/core/macros/tv-get-export-path
type: application/javascript
module-type: macro

Customize the static output.
\*/
(function() {

  /*jshint node: true, browser: true, sub: true */
  /*global $tw: false */
  "use strict";

  exports.name = "tv-get-export-path";

  exports.params = [{name: "title"}];

  exports.run = function(title) {
    // A falsey return value means use the default path.
    return $tw.wiki.getTiddler(title).fields["_static_path"];
  };

})();

On Tuesday, June 30, 2015 at 9:54:32 PM UTC-4, Devin Weaver wrote:
>
> Wait this feature seems to already be there: 
> http://tiddlywiki.com/#tv-get-export-path%20Variable
>
> On Tuesday, June 30, 2015 at 5:47:30 PM UTC-4, Devin Weaver wrote:
>>
>> So here is my use case and I'd like to propose a feature (obviously I 
>> would implement and send a pull request).
>>
>> I have a static site blog (http://tritarget.org/) And to be honest the 
>> build is way to complicated for my liking. Jekyl kept fighting me and using 
>> metelsmith now is like a 10 minute deploy step. It's silly. None of which 
>> takes in to account JavaScript. I'm a JS developer by day. I love 
>> frameworks like Ember.JS and such. But these frameworks are not so useful 
>> as a blog because search engines can't crawl it well. Then I saw hoe 
>> tiddlywiki.com does it! Perfect a fully fledged (and I'll admit, 
>> beautiful) single page app that does everything I want including writing 
>> out tiddlers to static files. Perfect!
>>
>> The gotcha: the current site already has several back links to it. 
>> Changing the names and file structure of those static HTML files would 
>> trash the current search results and break a lot of other people's links. 
>> So what I want to to recreate the site in TiddlyWiki and have my build 
>> process also render the static files but use a field to determine the 
>> outputs file/directory names. This way new content can easily be managed 
>> and created while old content can keep it's legacy paths.
>>
>> I'd propose to add a feature to look at a tiddlers fields for something 
>> like "_static_path" and use that (kinda like how external images use 
>> "_cononical_url").
>>
>> I'd like to work on this and would be happy to send a PR. Is it worth it 
>> for the community?
>>
>> On Sunday, June 21, 2015 at 9:28:40 PM UTC-4, Devin Weaver wrote:
>>>
>>> The documentation is a little sparse on this. When attempting to render 
>>> static files 
>>> <http://tiddlywiki.com/#Generating%20Static%20Sites%20with%20TiddlyWiki> 
>>> is there a way to choose the output path/filename or is is based on the 
>>> tiddlers directory structure or the tiddler titles?
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ef6096da-993a-45ee-9eab-51445be7d5a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to