imfing / hextra

🔯 Modern, batteries-included Hugo theme for creating beautiful doc, blog and static websites
https://imfing.github.io/hextra/
MIT License
696 stars 164 forks source link

Some advices about blog #227

Open librehugohu opened 10 months ago

librehugohu commented 10 months ago

I have some thoughts about blog page.

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

imfing commented 10 months ago

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.

librehugohu commented 10 months ago

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.

StefanKoell commented 10 months ago

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

confusedkernel commented 9 months ago

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

mafendi commented 9 months ago

+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

imfing commented 9 months ago

+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 commented 9 months ago

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.

Gray-Stone commented 7 months ago

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.