Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some advices about blog #227

Open
librehugohu opened this issue Dec 11, 2023 · 8 comments
Open

Some advices about blog #227

librehugohu opened this issue Dec 11, 2023 · 8 comments
Labels
blog Related to blog functionality and styles enhancement New feature or request
Milestone

Comments

@librehugohu
Copy link

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

@imfing
Copy link
Owner

imfing commented Dec 19, 2023

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
Copy link
Author

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
Copy link

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

@nottyl
Copy link

nottyl commented Jan 11, 2024

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

@mafendi
Copy link
Contributor

mafendi commented Jan 11, 2024

+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 imfing added enhancement New feature or request blog Related to blog functionality and styles labels Jan 15, 2024
@imfing imfing added this to the v0.8.0 milestone Jan 15, 2024
@imfing
Copy link
Owner

imfing commented Jan 15, 2024

+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
Copy link
Owner

imfing commented Jan 15, 2024

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
Copy link

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.

@imfing imfing modified the milestones: v0.8.0, v0.9.0 Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog Related to blog functionality and styles enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants