-
If an .md file has
specified, how can this be displayed in the HTML ? I can see that one of the showcases for the learn theme has it shown/displayed, see https://tshark.dev/formats/format_usage/ Have read through all the documentation for the theme and can't find out how to turn this feature on ? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 2 replies
-
@McShelby has been giving me some tips in the thread at https://discourse.gohugo.io/t/displaying-author-and-date-in-content/34505 . This works okay ` {{ .ReadingTime }} min | {{ .Params.Author }} | {{ .Date.Format "January 1, 2006"}} {{- .Content -}}` It no doubt needs some conditional code; not everyone wants the date/time displayed. (Not all the code is appearing in this Github post ; see https://discourse.gohugo.io/t/displaying-author-and-date-in-content/34505/7?u=jehoshua7 for all the code) |
Beta Was this translation helpful? Give feedback.
-
Can this be added as an enhancement to the theme ? A parameter/boolean to indicate whether to display the information or not. It's working fine on a live site |
Beta Was this translation helpful? Give feedback.
-
Although we have a similar footer at my companies site, usually every use case is different and requires different information, ordering and styling in the footer. This permutation can not be handled by the theme itself. |
Beta Was this translation helpful? Give feedback.
-
This isn't in the footer though, it is a modification to
Yet the learn theme that this theme was forked from, has a minor modification to display the read time, author and date. See https://tshark.dev/formats/pcapng_format/ Simply meaning it can be done and as the example code shows, it is only minor modifications. All that said, I recognise that as you are the maintainer of this theme, I may not be able to persuade you though. 👍 There was some mention of bringing in a templating system for content. Is that in place or in a future release please ? Thanks for your help. :) |
Beta Was this translation helpful? Give feedback.
-
Thanks for your replies @McShelby , much appreciated.
Yes it seems the best option all around. Will the content template concepts be an easier method in the long run ? I'm just mindful of re-applying code modifications when I want/need to use an update of the theme. |
Beta Was this translation helpful? Give feedback.
-
Providing your changes in |
Beta Was this translation helpful? Give feedback.
-
I use Beyond Compare to quickly check on any changes/additions, etc, so it should be very minimal indeed. Thanks 👍 |
Beta Was this translation helpful? Give feedback.
Providing your changes in
layouts/partials/content.html
will survive all updates. Unless you're not relying on CSS of the theme, your layout will still look fine and will not need any changes after an update.