Exact markdown list format recognized by HUGO please

Hii

I read many topics here relating to the markdown list format issues.
Tryed all sorts of types of spaces, empty lines, CSS ol, and ui settings, but i just cant get it to work.
The markdown list is either not displayed as one or not recognized by hugo.
Let’s see where i stucked now:
Markdown content file:

- Line 1
- Line 2
or
* Line 1
* Line 2

Tryed: 2,4 spaces everywhere. Also no spaces(what atleast breaks the line)

config.toml

...
[markup]
  [markup.goldmark]
    [markup.goldmark.extensions]
      definitionList = true
      footnote = true
      linkify = true
      linkifyProtocol = 'https'
      strikethrough = true
      table = true
      taskList = true
      typographer = true
    [markup.goldmark.parser]
      autoHeadingID = true
      autoHeadingIDType = 'github'
      wrapStandAloneImageWithinParagraph = true
      [markup.goldmark.parser.attribute]
        block = false
        title = true
    [markup.goldmark.renderer]
      hardWraps = true
      unsafe = true
      xhtml = false

Enabled the hardWraps and unsafe html code, rest is default.

my actual CSS settings involving; li,ol,ul:

li {                                      /*Format the list elements*/
  float: left;
}

ol, ul {                                      /*Format of the unordered HTML list*/
  list-style-type: none;
  list-style:none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

Please let me know how it is done in HUGO… just a simple markdown list…and im using Obsidian since 2 years so not new to md but this is driving me crazy :crazy_face:
Thank you

Either should be fine, run with dashes

You wont see bullets with this css, how do you want it to look?

Oh wow, didnt knew that. I just want them to look like the normal “disc”.
so i guess: list-style-type: disc;

No luck with:

ol, ul {
  list-style-type: disc;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

li {
  list-style-type: disc;
  float: left;
}

I had a look at the link you posted the other day, the html is really strange to me.
You have two opening html tags, one closing. Two opening body tags then two closing.
Three open footer tags, one closing footer tag.
Fix the structure first, maybe the lists look right then.

Yes, i know what you mean the generated html seems bad, but i cleaned up a loot today and doublechecked for missing or duplicate tags.

baseof.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="{{ `css/styles.css` | relURL }}">
    <link rel="shortcut icon" type="image/png" href="{{ `/img/favicon.png` | relURL }}">
    <link rel="shortcut icon" sizes="64x64" href="{{ `/img/favicon.png` | relURL }}">
    <link rel="apple-touch-icon" href="{{ `/img/favicon.png` | relURL }}">
    <title>
    {{ block "title" . }}>{{ .Site.Title }}
    {{ end }}
    </title>
  </head>
  <body>
    <header>
      {{ block "header" . }}
      {{- partial "header.html" . -}}
      {{ end }}
    </header>
    <main>
      {{ block "main" . }}
      {{ end }}
    </main>
    <footer class="sticky-footer">
      {{ block "footer" . }}
      {{- partial "footer.html" . -}}
      {{ end }}
    </footer>
  </body>
</html>

single.html

{{ define "main" }}
<h3>{{ .Title }}</h3>
{{ .Content }}
{{ end }}

list.html

{{ partial "header.html" . }}
{{ define "main" }}
<main>
    <article>
        <header>
            <h3>{{.Title}}</h3>
        </header>
        <!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
        {{.Content}}
    </article>
    <ul>
    <!-- Ranges through content/posts/*.md -->
    {{ range .Pages }}
        <li>
            <a href="{{.Permalink}}">{{.Date.Format "2006-01-02"}} | {{.Title}}</a>
        </li>
    {{ end }}
    </ul>
</main>
{{ end }}

index.html

{{ define "main" }}
    <main aria-role="main">
      <header>
        {{ with .Params.subtitle }}
        <span class="subtitle">{{.}}</span>
        {{ end }}
      </header>
      <div>
        <!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
        {{.Content}}
      </div>
      <div>
        {{ range first 10 .Site.RegularPages }}
            {{ .Render "summary"}}
        {{ end }}
      </div>
    </main>
{{ end }}

header.html

<!DOCTYPE html>
<html>
<body>
<ul>
  <li><a href="https://personalpage.mywire.org"><img src="/img/favicon.png" width="64" height="64"></a></li>
  <li><a href="/product1/page1">One page</a></li>
  <li class="dropdown">
    <a href="javascript:void(0)" class="dropbtn">Dropdown</a>
    <div class="dropdown-content">
      <a href="https://www.google.com">Google</a>
      <a href="#">Page 2</a>
      <a href="#">Page 3</a>
    </div>
  </li>
</ul>
</body>
</html>

maybe some of those “main” parts are not needed? i dont realy managed to find out yet what is to much and what is needed

So tomorrow i will then start to delete parts of the code and see by trial and error what makes it leaner or break it totaly. If you could please provide me some hints what looks the most suspicious and i start with those. TY for today and Good night

Your header.html partial is adding html and body tags
partial means it is “part of” another template, that other template already adds those tags.

1 Like

Gm

I generaly cleaned up / removed all kinds of unnecessary code from the layout files but that was not the issue.
The “problem” was in the CSS.
I did generate menu by moving my objects to the left close to eacother.
By removing the float: left formating md list got rendered

li {
  list-style-type: disc;
  float: left;
}

Anyhow, now i need to fix a new menu :roll_eyes:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.