Re: [tw5] URL of the current tiddler

2020-04-25 Thread Mat
Anne-Laure Le Cunff wrote:
>
> Thanks so much Saq and Jeremy!
>
> Here  is the final 
> result – many thanks for your help!
>

Very nice and clean!
When link-popup is above the link, it seems the link is covered and cannot 
be clicked. The link is clickable if passing outside of the vertical 
"column" that  the link covers. When the popup is below the link, 
everything works.

<:-)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7d1152d0-56c9-4540-98eb-db70e80ce7f1%40googlegroups.com.


Re: [tw5] URL of the current tiddler

2020-04-25 Thread Mohammad
Hi Anne-Laure,

Thank you for sharing!



On Saturday, April 25, 2020 at 7:17:02 PM UTC+4:30, Anne-Laure Le Cunff 
wrote:
>
> Thanks so much Saq and Jeremy!
>
> Here  is the final 
> result – many thanks for your help!
>

This is lovely! The UI is simple and semantic!
 
--Mohammad


> On Saturday, April 25, 2020 at 1:39:15 PM UTC+1, Jeremy Ruston wrote:
>>
>> Sorry to be late to this thread.
>>
>> The static site generation templates included in the core don’t need to 
>> know the URL at which the site will be published because it only generates 
>> relative URLs. As things stand, users have to edit the definition 
>> of tv-wikilink-template in those templates to include their full URL.
>>
>> An alternative that might work better in some situations would be pass 
>> the URL as a variable to the --rendertiddler or --render commands, and 
>> update the definition of tv-wikilink-template to include that variable.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>>
>> On 25 Apr 2020, at 10:58, Saq Imtiaz  wrote:
>>
>> @Anne-Laure you are welcome and this is helpful to the community too. We 
>> are very good at thinking in terms of manipulating content and presentation 
>> inside a running TW, but need some practice (and documentation) on 
>> extrapolating that to static html rendered from tiddlers.
>>
>> If you are keeping the JS macros in place, the last short version I 
>> posted is worth a try at some point.
>>
>> You are getting a uppercase first letter because the javascript macros 
>> turns the title into lowercase for the url and filenames.
>>
>> To do the same with tv-filter-export-link:
>> [split[ ]join[-]encodeuricomponent[]lowercase[]]
>>
>>
>> On Saturday, April 25, 2020 at 11:50:03 AM UTC+2, Anne-Laure Le Cunff 
>> wrote:
>>>
>>> Thanks so much, Saq!
>>>
>>> I may look into this later, but when I implemented your approach, it 
>>> generated exactly what I wanted, for instance (that's from the static 
>>> website output):
>>>
>>> https://twitter.com/intent/tweet?source=https://www.mentalnodes.com/Folders-kill-creativitytext=Folders
>>>  
>>> kill creativity:%20
>>> https://www.mentalnodes.com/Folders-kill-creativityvia=anthilemoonhashtags=mentalnodes;
>>>  
>>> target="_blank" title="Tweet">>> src="social-icons/Twitter.png">
>>>
>>>
>>> (not sure why the URL says "Folders" and not "folders" but that's minor)
>>>
>>> Very grateful!
>>>
>>> On Saturday, April 25, 2020 at 10:37:13 AM UTC+1, Saq Imtiaz wrote:

 @Anne-Laure we should have asked you for those files from the 
 beginning! That would have made helping you out a lot easier all along :)

 Those instructions for regex use one of the other three variables that 
 I mentioned, tv-get-export-link instead of tv-filter-export-link, which 
 requires javascript.

 You can mix and match both approaches but then it can be a little 
 tricky to ensure that both always return the exact same filenames and 
 corresponding links. This may not be an issue, but there is a chance it 
 might cause problems at some point. Basically its a case of making sure 
 the 
 filter in tv-filter-export-link does the exact same thing as the 
 javascript.

 With the way I outlined, you use the same filters for both and there is 
 no javascript involved, so there are no chances of such issues. Or 
 alternatively one could write another javascript macro that defines the 
 url 
 variable, using the same javascript logic.
 For a non-developer I think the non-javascript based approach will be 
 easiest in the long run.

 Regards,
 Saq

 On Saturday, April 25, 2020 at 11:11:56 AM UTC+2, Anne-Laure Le Cunff 
 wrote:
>
> Hi Saq,
>
> First, thanks so much for your help!
>
> Yes, I have modified *static.tiddler.html* - it looks like this 
> 
>  
> in my setup — and it looks like your approach is working! Thank you! Will 
> keep on tweaking, but if you're curious you can see here 
>  the files where I did 
> the regex edits. (following these instructions 
> 
> )
>
> Many thanks!
>
> On Saturday, April 25, 2020 at 9:37:44 AM UTC+1, Saq Imtiaz wrote:
>>
>> @Anne-Laure : I suspect we have been overcomplicating a bit because 
>> most of us are not familiar with the static site generation process. If 
>> you 
>> can walk us through a few details of your setup I think we are close a 
>> solution. Short instructions at the end, but please read through 
>> everything.
>>
>> Have you modified this template
>>  static.tiddler.html
>>
>> from the folder 
>> /core/templates?
>>
>> If so, please 

Re: [tw5] URL of the current tiddler

2020-04-25 Thread Birthe C
Hovering the link everything on my screen blinks browser inclusive. It 
takes quite some time.

lørdag den 25. april 2020 kl. 16.47.02 UTC+2 skrev Anne-Laure Le Cunff:
>
> Thanks so much Saq and Jeremy!
>
> Here  is the final 
> result – many thanks for your help!
>
> On Saturday, April 25, 2020 at 1:39:15 PM UTC+1, Jeremy Ruston wrote:
>>
>> Sorry to be late to this thread.
>>
>> The static site generation templates included in the core don’t need to 
>> know the URL at which the site will be published because it only generates 
>> relative URLs. As things stand, users have to edit the definition 
>> of tv-wikilink-template in those templates to include their full URL.
>>
>> An alternative that might work better in some situations would be pass 
>> the URL as a variable to the --rendertiddler or --render commands, and 
>> update the definition of tv-wikilink-template to include that variable.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>>
>> On 25 Apr 2020, at 10:58, Saq Imtiaz  wrote:
>>
>> @Anne-Laure you are welcome and this is helpful to the community too. We 
>> are very good at thinking in terms of manipulating content and presentation 
>> inside a running TW, but need some practice (and documentation) on 
>> extrapolating that to static html rendered from tiddlers.
>>
>> If you are keeping the JS macros in place, the last short version I 
>> posted is worth a try at some point.
>>
>> You are getting a uppercase first letter because the javascript macros 
>> turns the title into lowercase for the url and filenames.
>>
>> To do the same with tv-filter-export-link:
>> [split[ ]join[-]encodeuricomponent[]lowercase[]]
>>
>>
>> On Saturday, April 25, 2020 at 11:50:03 AM UTC+2, Anne-Laure Le Cunff 
>> wrote:
>>>
>>> Thanks so much, Saq!
>>>
>>> I may look into this later, but when I implemented your approach, it 
>>> generated exactly what I wanted, for instance (that's from the static 
>>> website output):
>>>
>>> https://twitter.com/intent/tweet?source=https://www.mentalnodes.com/Folders-kill-creativitytext=Folders
>>>  
>>> kill creativity:%20
>>> https://www.mentalnodes.com/Folders-kill-creativityvia=anthilemoonhashtags=mentalnodes;
>>>  
>>> target="_blank" title="Tweet">>> src="social-icons/Twitter.png">
>>>
>>>
>>> (not sure why the URL says "Folders" and not "folders" but that's minor)
>>>
>>> Very grateful!
>>>
>>> On Saturday, April 25, 2020 at 10:37:13 AM UTC+1, Saq Imtiaz wrote:

 @Anne-Laure we should have asked you for those files from the 
 beginning! That would have made helping you out a lot easier all along :)

 Those instructions for regex use one of the other three variables that 
 I mentioned, tv-get-export-link instead of tv-filter-export-link, which 
 requires javascript.

 You can mix and match both approaches but then it can be a little 
 tricky to ensure that both always return the exact same filenames and 
 corresponding links. This may not be an issue, but there is a chance it 
 might cause problems at some point. Basically its a case of making sure 
 the 
 filter in tv-filter-export-link does the exact same thing as the 
 javascript.

 With the way I outlined, you use the same filters for both and there is 
 no javascript involved, so there are no chances of such issues. Or 
 alternatively one could write another javascript macro that defines the 
 url 
 variable, using the same javascript logic.
 For a non-developer I think the non-javascript based approach will be 
 easiest in the long run.

 Regards,
 Saq

 On Saturday, April 25, 2020 at 11:11:56 AM UTC+2, Anne-Laure Le Cunff 
 wrote:
>
> Hi Saq,
>
> First, thanks so much for your help!
>
> Yes, I have modified *static.tiddler.html* - it looks like this 
> 
>  
> in my setup — and it looks like your approach is working! Thank you! Will 
> keep on tweaking, but if you're curious you can see here 
>  the files where I did 
> the regex edits. (following these instructions 
> 
> )
>
> Many thanks!
>
> On Saturday, April 25, 2020 at 9:37:44 AM UTC+1, Saq Imtiaz wrote:
>>
>> @Anne-Laure : I suspect we have been overcomplicating a bit because 
>> most of us are not familiar with the static site generation process. If 
>> you 
>> can walk us through a few details of your setup I think we are close a 
>> solution. Short instructions at the end, but please read through 
>> everything.
>>
>> Have you modified this template
>>  static.tiddler.html
>>
>> from the folder 
>> /core/templates?
>>
>> If so, please post your 

Re: [tw5] URL of the current tiddler

2020-04-25 Thread Anne-Laure Le Cunff
Thanks so much Saq and Jeremy!

Here  is the final 
result – many thanks for your help!

On Saturday, April 25, 2020 at 1:39:15 PM UTC+1, Jeremy Ruston wrote:
>
> Sorry to be late to this thread.
>
> The static site generation templates included in the core don’t need to 
> know the URL at which the site will be published because it only generates 
> relative URLs. As things stand, users have to edit the definition 
> of tv-wikilink-template in those templates to include their full URL.
>
> An alternative that might work better in some situations would be pass the 
> URL as a variable to the --rendertiddler or --render commands, and update 
> the definition of tv-wikilink-template to include that variable.
>
> Best wishes
>
> Jeremy
>
>
>
> On 25 Apr 2020, at 10:58, Saq Imtiaz > 
> wrote:
>
> @Anne-Laure you are welcome and this is helpful to the community too. We 
> are very good at thinking in terms of manipulating content and presentation 
> inside a running TW, but need some practice (and documentation) on 
> extrapolating that to static html rendered from tiddlers.
>
> If you are keeping the JS macros in place, the last short version I posted 
> is worth a try at some point.
>
> You are getting a uppercase first letter because the javascript macros 
> turns the title into lowercase for the url and filenames.
>
> To do the same with tv-filter-export-link:
> [split[ ]join[-]encodeuricomponent[]lowercase[]]
>
>
> On Saturday, April 25, 2020 at 11:50:03 AM UTC+2, Anne-Laure Le Cunff 
> wrote:
>>
>> Thanks so much, Saq!
>>
>> I may look into this later, but when I implemented your approach, it 
>> generated exactly what I wanted, for instance (that's from the static 
>> website output):
>>
>> https://twitter.com/intent/tweet?source=https://www.mentalnodes.com/Folders-kill-creativitytext=Folders
>>  
>> kill creativity:%20
>> https://www.mentalnodes.com/Folders-kill-creativityvia=anthilemoonhashtags=mentalnodes;
>>  
>> target="_blank" title="Tweet">> src="social-icons/Twitter.png">
>>
>>
>> (not sure why the URL says "Folders" and not "folders" but that's minor)
>>
>> Very grateful!
>>
>> On Saturday, April 25, 2020 at 10:37:13 AM UTC+1, Saq Imtiaz wrote:
>>>
>>> @Anne-Laure we should have asked you for those files from the beginning! 
>>> That would have made helping you out a lot easier all along :)
>>>
>>> Those instructions for regex use one of the other three variables that I 
>>> mentioned, tv-get-export-link instead of tv-filter-export-link, which 
>>> requires javascript.
>>>
>>> You can mix and match both approaches but then it can be a little tricky 
>>> to ensure that both always return the exact same filenames and 
>>> corresponding links. This may not be an issue, but there is a chance it 
>>> might cause problems at some point. Basically its a case of making sure the 
>>> filter in tv-filter-export-link does the exact same thing as the javascript.
>>>
>>> With the way I outlined, you use the same filters for both and there is 
>>> no javascript involved, so there are no chances of such issues. Or 
>>> alternatively one could write another javascript macro that defines the url 
>>> variable, using the same javascript logic.
>>> For a non-developer I think the non-javascript based approach will be 
>>> easiest in the long run.
>>>
>>> Regards,
>>> Saq
>>>
>>> On Saturday, April 25, 2020 at 11:11:56 AM UTC+2, Anne-Laure Le Cunff 
>>> wrote:

 Hi Saq,

 First, thanks so much for your help!

 Yes, I have modified *static.tiddler.html* - it looks like this 
 
  
 in my setup — and it looks like your approach is working! Thank you! Will 
 keep on tweaking, but if you're curious you can see here 
  the files where I did 
 the regex edits. (following these instructions 
 )

 Many thanks!

 On Saturday, April 25, 2020 at 9:37:44 AM UTC+1, Saq Imtiaz wrote:
>
> @Anne-Laure : I suspect we have been overcomplicating a bit because 
> most of us are not familiar with the static site generation process. If 
> you 
> can walk us through a few details of your setup I think we are close a 
> solution. Short instructions at the end, but please read through 
> everything.
>
> Have you modified this template
>  static.tiddler.html
>
> from the folder 
> /core/templates?
>
> If so, please post your customized template. If not, where exactly are 
> you using regexp to replace the spaces in file names, and the links to 
> them, with hyphens?
>
> TiddlyWiki defines three variables that can be used to tweak the 
> structure of url's in the static files generated:
>
> 

Re: [tw5] URL of the current tiddler

2020-04-25 Thread Jeremy Ruston
Sorry to be late to this thread.

The static site generation templates included in the core don’t need to know 
the URL at which the site will be published because it only generates relative 
URLs. As things stand, users have to edit the definition of 
tv-wikilink-template in those templates to include their full URL.

An alternative that might work better in some situations would be pass the URL 
as a variable to the --rendertiddler or --render commands, and update the 
definition of tv-wikilink-template to include that variable.

Best wishes

Jeremy



> On 25 Apr 2020, at 10:58, Saq Imtiaz  wrote:
> 
> @Anne-Laure you are welcome and this is helpful to the community too. We are 
> very good at thinking in terms of manipulating content and presentation 
> inside a running TW, but need some practice (and documentation) on 
> extrapolating that to static html rendered from tiddlers.
> 
> If you are keeping the JS macros in place, the last short version I posted is 
> worth a try at some point.
> 
> You are getting a uppercase first letter because the javascript macros turns 
> the title into lowercase for the url and filenames.
> 
> To do the same with tv-filter-export-link:
> [split[ ]join[-]encodeuricomponent[]lowercase[]]
> 
> 
> On Saturday, April 25, 2020 at 11:50:03 AM UTC+2, Anne-Laure Le Cunff wrote:
> Thanks so much, Saq!
> 
> I may look into this later, but when I implemented your approach, it 
> generated exactly what I wanted, for instance (that's from the static website 
> output):
> 
>  href="https://twitter.com/intent/tweet?source=https://www.mentalnodes.com/Folders-kill-creativitytext=Folders
>  
> 
>  kill 
> creativity:%20https://www.mentalnodes.com/Folders-kill-creativityvia=anthilemoonhashtags=mentalnodes
>  
> "
>  target="_blank" title="Tweet"> src="social-icons/Twitter.png">
> 
> (not sure why the URL says "Folders" and not "folders" but that's minor)
> 
> Very grateful!
> 
> On Saturday, April 25, 2020 at 10:37:13 AM UTC+1, Saq Imtiaz wrote:
> @Anne-Laure we should have asked you for those files from the beginning! That 
> would have made helping you out a lot easier all along :)
> 
> Those instructions for regex use one of the other three variables that I 
> mentioned, tv-get-export-link instead of tv-filter-export-link, which 
> requires javascript.
> 
> You can mix and match both approaches but then it can be a little tricky to 
> ensure that both always return the exact same filenames and corresponding 
> links. This may not be an issue, but there is a chance it might cause 
> problems at some point. Basically its a case of making sure the filter in 
> tv-filter-export-link does the exact same thing as the javascript.
> 
> With the way I outlined, you use the same filters for both and there is no 
> javascript involved, so there are no chances of such issues. Or alternatively 
> one could write another javascript macro that defines the url variable, using 
> the same javascript logic.
> For a non-developer I think the non-javascript based approach will be easiest 
> in the long run.
> 
> Regards,
> Saq
> 
> On Saturday, April 25, 2020 at 11:11:56 AM UTC+2, Anne-Laure Le Cunff wrote:
> Hi Saq,
> 
> First, thanks so much for your help!
> 
> Yes, I have modified static.tiddler.html - it looks like this 
> 
>  in my setup — and it looks like your approach is working! Thank you! Will 
> keep on tweaking, but if you're curious you can see here 
>  the files where I did the 
> regex edits. (following these instructions 
> )
> 
> Many thanks!
> 
> On Saturday, April 25, 2020 at 9:37:44 AM UTC+1, Saq Imtiaz wrote:
> @Anne-Laure : I suspect we have been overcomplicating a bit because most of 
> us are not familiar with the static site generation process. If you can walk 
> us through a few details of your setup I think we are close a solution. Short 
> instructions at the end, but please read through everything.
> 
> Have you modified this template
>  static.tiddler.html
> 
> from the folder
> /core/templates?
> 
> If so, please post your customized template. If not, where exactly are you 
> using regexp to replace the spaces in file names, and the links to them, with 
> hyphens?
> 
> TiddlyWiki defines three variables that can be used to tweak the structure of 
> url's in the static files generated:
> https://tiddlywiki.com/#tv-wikilink-template%20Variable:%5B%5Btv-wikilink-template%20Variable%5D%5D%20%5B%5Btv-filter-export-link%20Variable%5D%5D%20%5B%5Btv-get-export-link%20Variable%5D%5D
>  
>