typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

About long links and the <wbr> tag #400

Closed yesilovebooks closed 2 months ago

yesilovebooks commented 11 months ago

Hello.

My name is Alexandre. I discovered Typemill one week ago and I still studying all the features and checking the docs... Unfortunately, untill now, I did not understand how I can use the html tag "wbr" to break the lines in a long link...

Thank you for any help.

trendschau commented 11 months ago

Hi Alexandre,

Typemill does not accept html-tags. You can use the html-open and html-close tags but they probably won't work with inline tags. Maybe you can solve the problem with css-rules on links?

yesilovebooks commented 11 months ago

Hi Trendschau!

Thank you for your help 👊

When I open my blog in a small screen, like smartphone, the link is seen like in the picture bellow:

Screenshot_2023-06-05-11-01-16-929_com duckduckgo mobile android

I always use the wbr to solve this, but unfortunately it seems that I can't use it with Typemil...

I did not try the CSS, you gave me a good Idea.

If I be sucessful I come back here and write again.

Bye the way, my blog about the books I've read is:

http://www.lendonojardim.cyou

Bye, and thank you again!

Alexandre.

yesilovebooks commented 11 months ago

Hi again.

Today I finally discovered how to fix this:

1) First, we just need to add this piece of code inside the .css style file:

===

div {
&.wbr {
word-break: break-all;

} }

===

I used the customcss plugin for this.

2) Then, using the editor in the raw mode, add this:

[:htmlopen tag="div" class="wbr":]
[https://www.alongdomainhereasanexemple.afaketopleveldomain/alongdirectoryhere/alongfileheretoo.html](https://www.alongdomainhereasanexemple.afaketopleveldomain/alongdirectoryhere/alongfileheretoo.html)
[:htmlclose tag="div":]

3) Save it and see the result.

trendschau commented 2 months ago

Glad you discovered it, Typemill 2 is out and there is a new html-plugin. It does not support the wbr-tag right now but I will add it to the list. Be aware that the new html-plugin requires a maker-license, so it is not free.

I will close this ticket for now.