Append to Aside


#1

Hello,

Is there a possibility that I can specify in the Markdown files that Hugo inserts the link list and the image gallery into the aside element?

The linklist and images are ever written at last in every file.

Thank you
Silvio


#2

Hello,

maybe can handle with shortcode?

<aside>
  {{ .Inner }}
    {{ if or (.Get "link") (.Get "image") (.Get "linktitle") }}
      <div class="linklist">
      {{ if .Get "link" }}
        <a href="{{ .Get "link" }}">
            {{ if .Get "linktitle" }}
              {{ .Get "linktitle" }}
            {{ end }}
        </a>
      {{ end }}
      </div>

      <div class="gallery">
      {{ if .Get "image" }}
        <img src="{{ .Get "image" }}" alt="image">
      {{ end }}
      </div>
    {{ end }}
</aside>

But can in Shortcode include the tags list? Partial?

Thank you
Silvio


#3

You cannot reference a partial from within a shortcode.

Also your original question is a bit vague.

Have a look at Hugo themes that display such information in the sidebar.

For example the Icarus theme

You might find exactly what you need.


#4

For example at moment the article output of markdown files is so and the goal would be bring the links and images in the

Silvio


#5

Please have a look at the Requesting Help topic.

You cannot expect us to help you build your site from scratch.

When you have a more specific question open a new topic.


#6