In case anyone comes across this thread, experiencing the same issues I 
had... I thought it would be helpful to post my solution. After a bit more 
research I came to the understanding that Tiddlywiki doesn't have the 
ability to serve local files. This is a feature that is somewhat overlooked 
since it is, normally, handled by an internet facing web server. However, 
in my use case - deployed on my laptop - I had no need of a web server.

I ended up installing Nginx... which is light with a small footprint. After 
installing, I created a simple config file to utilize tiddlywiki through a 
proxy and define a file root for my pdfs and images: 

/etc/nginx/sites-enabled/tiddlywiki.conf:

server {
    listen           80;
    server_name      localhost;
    # vhost specific logs
    access_log       /var/log/nginx/tiddlywiki.access.log combined;
    location / {
        proxy_pass   http://127.0.0.1:4444;
        proxy_set_header        Host             $host;
        proxy_set_header        X-Real-IP        $remote_addr;
        proxy_set_header        X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
    location /pdf/ {
        root /opt/sync/wiki/;
    }
    location /images/ {
        root /opt/sync/wiki/;
    }
}

Now, the common tags: 

<a href="/pdf/CumalaTechnicalInfo.pdf" target="_blank">Cumala Technical 
Info</a>

[ext[Cumala Technical Info|/pdf/CumalaTechnicalInfo.pdf]]

Work as expected...

Hopefully this helps someone else... 
Daniel



On Monday, October 13, 2014 7:07:35 AM UTC-3, Daniel Caleb wrote:
>
> Thanks for your reply... Generating a static page while using the file:/// 
> URI works properly. Which leads me to believe that you are correct; node.js 
> needs to be configured for serving static content.
>
> I was under the impression that others on the mailing list had gotten the 
> syntax: 
>
> <a href="./pdf/CumalaTechnicalInfo.pdf" target="_blank">Cumala Technical 
> Info</a>
>
> to work properly; as in [1] and [2]. If that's the case, then this is a 
> problem with my configuration specifically. I've not explored node.js very 
> much... I installed it via the package manager in Ubuntu and tiddlywiki via 
> npm -g as the ReadMe suggests. Are there any dependencies that TW5 might be 
> missing? Any help or direction on this subject would be greatly 
> appreciated...
>
> Thanks again,
> Daniel
>  
> [1] https://groups.google.com/d/topic/tiddlywiki/EmJFLV1XAD0/discussion
>
> [2] https://groups.google.com/d/topic/tiddlywiki/u0pcaOIOdA4/discussion
>
>
> On Monday, October 13, 2014 12:14:30 AM UTC-3, Stephan Hradek wrote:
>>
>>
>>
>> Am Sonntag, 12. Oktober 2014 22:13:21 UTC+2 schrieb Daniel Caleb:
>>>
>>> The root directory containing my "tiddlers" is: /opt/sync/wiki/tiddlers/
>>>
>>> /opt/sync/wiki is the root of the tiddlywiki server - hence everything 
>>> I'm attempting to reference should be relative to the tiddlywiki server 
>>> root.
>>>
>>
>> Yes - but you need to leave the root out, so
>>  
>>
>>> I've also tried: 
>>>
>>> <a href="./pdf/CumalaTechnicalInfo.pdf" target="_blank">Cumala Technical 
>>> Info</a>
>>>
>>  
>>
>>>
>>> with a similar result, the URL produced is: 
>>>
>>> http://127.0.0.1:4444/pdf/CumalaTechnicalInfo.pdf
>>>
>>
>> That URL is correct. But as said before: The server is, I think, not 
>> configured to serve files. So you need to reconfigure it. Don't ask me how 
>> or whether it's possible at all.
>>  
>>
>>> Using file:/// doesn't work at all - it creates the link as expected, 
>>> but clicking on the link does nothing... even right-clicking and attempting 
>>> to force a new tab produces no response.
>>>
>>
>> Can you show the resulting source? 
>>
>> Does that source work when you create a static HTML containing the same 
>> source?
>>
>>
>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to