Raku / Pod-To-HTML

Convert Raku docs to shiny HTML
Artistic License 2.0
12 stars 19 forks source link

=TITLE and =SUBTITLE seems to be ignored #70

Closed antoniogamiz closed 4 years ago

antoniogamiz commented 4 years ago

Hi, using the new version of Pod::To::HTML I have found that =TITLE and =SUBTITLE seems to be ignored:

image

The output should be something like this:

image

antoniogamiz commented 4 years ago

Yep, that code was deleted here: https://github.com/Raku/Pod-To-HTML/commit/e0e4950e5b83a9b1a35673e037d1d5beb9b80bb1#diff-d42ac4371a461e47eccdece085173230L371-L376

@uzluisf why did you delete that part?

antoniogamiz commented 4 years ago

Adding

        <h1 class="title">{{title}}</h1>
        <p class="subtitle">{{subtitle}}</p>

to my mustache template solves the problem. I do not if those two lines should appear in the default template.

uzluisf commented 4 years ago

Hi, @antoniogamiz! Sorry for the late reply 😅😅.

why did you delete that part?

From the commit message:

Instead of supplying a few semantic blocks as HTML meta tags, Pod::To::HTML now supplies all of them as regular template variables to the template.

Thus in the code neither TITLE nor SUBTITLE are treated specially (reference), instead all the semantic blocks declared in a Pod document are made available to a Mustache template. The README file discusses this a bit more.

I do not if those two lines should appear in the default template.

I'm not sure 🤔🤔. How else is Template::Mustache going to render the data unless it's specified in the template and subsequently supplied to it by Pod::To::HTML? Where should they appear?

antoniogamiz commented 4 years ago

From the commit message:

Instead of supplying a few semantic blocks as HTML meta tags, Pod::To::HTML now supplies all of them as regular template variables to the template.

Oh, I did not understand the commit message completely, my fault, sorry. Thinking about it is better to use the semantic block as you have done, thanks for the implementation :).