hextra icon indicating copy to clipboard operation
hextra copied to clipboard

Some advices about blog

Open librehugohu opened this issue 1 year ago • 8 comments

I have some thoughts about blog page.

  • Add a tag filter to enhance blog's function.
  • Use timeline and card view to optimize blog page UI.

Then I use steps & cards shortcode to build a demo(And you can see the card with image has a display error).

// File path: content/blog/_index.md

{{% steps %}}

### 2023

{{< cards >}}
  {{< card link="/" title="My first blog" icon="document-text" 
  subtitle="这篇文章提供了一些基础的 Markdown 语法样例,这些可以在 Hugo 的内容文件中使用.">}}
  {{< card link="/" title="My second blog" icon="document-text">}}
{{< /cards >}}

### 2022

{{< cards >}}
  {{< card link="/" title="Blog with cover" 
  image="https://source.unsplash.com/featured/800x600?landscape"  >}}
{{< /cards >}}

{{% /steps %}}

image

librehugohu avatar Dec 11 '23 06:12 librehugohu

Use timeline and card view to optimize blog page UI. Then I use steps & cards shortcode to build a demo(And you can see the card with image has a display error).

hmmm, I get what you were trying to achieve here, but I don't think this is the intended use case of the steps shortcode.

It would be better to create a custom layout with components similar to https://flowbite.com/docs/components/timeline/

I will look into what caused the display error though.

imfing avatar Dec 19 '23 01:12 imfing

Yes, I knew it. Wrong use leads to wrong result. This usage does defeat the purpose of the 'steps' shortcode. So I think it doesn't matter if this bug is fixed or not.

After all I just tried to build a demo with shortcode in the beginning and it worked unexpectedly, and I don't think anyone would use shortcode like that.

librehugohu avatar Dec 19 '23 01:12 librehugohu

I really like the idea of the Categories/Tags list to filter the blog. +1 from me for that!

StefanKoell avatar Dec 30 '23 14:12 StefanKoell

+1 from me! also would be nice to have an archive/categories type of taxonomy feature supported in hextra!

confusedkernel avatar Jan 11 '24 06:01 confusedkernel

+1 from me for tags/categories

Also, regarding the image for the blog post... Could you pls add this feature as well?

I currently use subtitle and featuredImage in the front matter

       <div class="content mt--12">
          <div class="text-xl mb-6 text-justify">{{ .Params.subtitle }}</div>
          <img src="{{ .Params.featuredImage | absURL }}" alt="{{ .Title }}" title="{{ .Title }}" width="100%" loading="lazy">
          {{ .Content }}
       </div>

The result is in the pic attached GLEIF Data Quality Reports November 2023 – LEIpapa

mafendi avatar Jan 11 '24 15:01 mafendi

+1 from me for tags/categories

re: tags and categories for the blog

I would also like the blog section to have these out-of-the-box. Will prioritize these in the next a few releases. 😃

imfing avatar Jan 15 '24 22:01 imfing

Also, regarding the image for the blog post... Could you pls add this feature as well?

I currently use subtitle and featuredImage in the front matter

I will need to think about it, since the subtitle and featuredImage sounds too specific to your project or blog.

Alternatively you could wrap those in a custom shortcode or just override the default blog post template.

imfing avatar Jan 15 '24 22:01 imfing

I really want a mode where card-view is used by default to list all content, in my case when building a portfolio.

I think it would be nice if to have a third mode then blog/doc that default to this view.

Also would be great if I don't have to fill in the image url for each card view separately, but instead the code just auto grab the "featurnedImage" key in each page's front matter if the card refer to a internal content.

Gray-Stone avatar Mar 21 '24 09:03 Gray-Stone