champorado
  • 2022-11-15 21:39:34 +0800 +0800
    champorado

    champorado

    2022.11.15

    Display posts feed like Tumblr

    Displaying posts in home feed fully formatted instead of plaintext.

    In the theme’s layouts/partials/li.html:

    • {{ .Summary | markdownify }} was removed

    • everything in the {{ if .Truncated }} section was altered into the following:

      {{ if .Truncated }}
          {{ .Summary }}
          <div id="open">
              <a href="{{ .Permalink }}" class="properties"><strong>[ read more ]</strong></a>
          </div>
      
          {{ else if .Params.summary }}
              {{ .Summary }}
              <div id="open">
                  <a href="{{ .Permalink }}" class="properties"><strong>[ read more ]</strong></a>
              </div>
      
          {{ else }}
              {{ .Content }}
      {{ end }}
      

      {{ .Content }} was placed in favor of displaying links and formatting correctly for microblogs which are categorized as “notes” in this theme instead of {{ .Summary }}. The latter is used only for posts that contain a “read more.”

    2022-11-15 21:39:34 +0800 +0800 2022.11.15