Open kazarena opened 3 years ago
Or maybe it's designed to work this way?
Yes, this is intended behavior. There is a heuristic for applying the effect: if there is content before what is considered the lede paragraph, the big font is not applied.
There is probably room for tuning the heuristic, but I feel it is necessary to have it or otherwise many pages will get the effect inappropriately.
In the specific case on Konpeito, the effect shouldn't be applied in any case because the site uses hard-wrapped lines and that would only make the first line of the (apparent) paragraph have a larger font. Hard-wrapped lines should actually be added to the heuristic...
@skyjake, thank you for the explanation. I'm happy with the proposed strategy.
In the specific case on Konpeito, the effect shouldn't be applied in any case because the site uses hard-wrapped lines...
I noticed the behaviour above with my own site (without hard-wrapped lines), that collapsing the pre-formatted header would affect the rendering of the first paragraph. Speaking of the heuristic, I wonder if pre-formatted blocks should be treated more like an image in a traditional sense (as we can't apply format to it) rather than text, and therefore ignored by the heuristic? In the majority of cases so far, the pre-formatted block in the beginning of the page would be ascii art, so it confirms this line of thinking.
I'll want to add in on this issue. This is the rendering
For this code
# Title 1
# Title 2
Line one.
Line two.
In this case there have been titles before the first line. The line reading "Line one." is clearly not a lede anymore.
I understand that this behaviour can be turned off by the user of the client, somewhere in the settings.
What I would be interested more; is there a way for me as the capsule owner to disable this "larger font on first line" behaviour? It totally breaks my page layout. Can I put a config file
in the same document root that is read by lagrange with lede=disabled
or something?
Besides that, thank you @skyjake for lagrange. It essentially is the only gemini browser that handles my idn domain name properly.
The line reading "Line one." is clearly not a lede anymore.
Well, I would say that's still context-dependent. One could have any number of heading lines preceding the actual lede paragraph of the page. The automatic detection is just going to fail in some cases.
is there a way for me as the capsule owner to disable this "larger font on first line" behaviour?
Unfortunately no. The Gemini protocol has no mechanism for the capsule owner to specify this kind of markup that would influence how clients present the content.
Could you give me the URL of the page that you feel is being improperly presented? I can always tweak the detection algorithm.
@skyjake, thank you for creating the most awesome browser! I use it every day now.
Problem
Prior to version 1.3.0, Lagrange had a very nice feature: the first plain-text paragraph was emphasised with a larger font. I found it to be a great visual aid. I believe the feature is still there, but it doesn't always get triggered. For example, when there is a pre-formatted block at the beginning of the page, it doesn't appear.
Or maybe it's designed to work this way?
Examples
My environment