vjeantet / hugo-theme-docdock

Declination of @matcornic Learn theme to Hugo
https://docdock.netlify.com/
MIT License
586 stars 316 forks source link

How to remove "last update" and "improve this page" #222

Open JoshuaKissel opened 2 years ago

JoshuaKissel commented 2 years ago

I'm looking to figure out how to remove the following from my footer: image

In the md for my footer there is just a table with an image inside, not sure where the two links are coming from.

Thoughts?

Thanks!

Raghav-Uppala commented 2 years ago

After searching pretty much every single file, I found the solution. This is my own solution, I am not sure if this is the best solution. Nor the side effects of it. However, it wouldn't seem to have any side effects.


Go to the theme dir. Then go to layouts\partials\flex\body-aftercontent.html Remove:

{{ if not .Page.Lastmod.IsZero }}
    <div class="date">
        <i class='fa fa-calendar'></i> {{T "last-update-on"}} {{ .Page.Lastmod.Format "02/01/2006" }}
    </div>
    {{end}}

    {{ if .Site.Params.editURL }}
    <div class="github-link">
      <a href="{{ .Site.Params.editURL }}{{ replace .File.Dir "\\" "/" }}{{ .File.LogicalName }}" target="blank"><i class="fa fa-code-fork"></i>
        {{T "Edit-this-page"}}</a>
    </div>
    {{end}}

image The image is not loading, just copy the link.