Skip to content

Display content of blog index or blog-section index#2073

Closed
froboy wants to merge 2 commits intogoogle:mainfrom
froboy:patch-1
Closed

Display content of blog index or blog-section index#2073
froboy wants to merge 2 commits intogoogle:mainfrom
froboy:patch-1

Conversation

@froboy
Copy link
Copy Markdown
Contributor

@froboy froboy commented Aug 20, 2024

Fixes #1787.

I needed this for my project and saw the issue open. Currently Blog Section pages don't have a h1 either, so this adds the title of the section as well.

@froboy
Copy link
Copy Markdown
Contributor Author

froboy commented Aug 20, 2024

@chalin I took a quick stab at this. The content and title will be shown above Blog Sections.

From our site, as an example:

SCR-20240820-poxm

Copy link
Copy Markdown
Contributor

@fekete-robert fekete-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@froboy
Copy link
Copy Markdown
Contributor Author

froboy commented Aug 21, 2024

Not quite... this displays the content on section pages, but duplicates it on blog items. Working on a fix.

@froboy
Copy link
Copy Markdown
Contributor Author

froboy commented Aug 21, 2024

{{ if .IsSection }} fixed that up.

Copy link
Copy Markdown
Collaborator

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @froboy.

After assessing alternatives, I think that it's better to add this feature via list.html instead. See:

@chalin
Copy link
Copy Markdown
Collaborator

chalin commented Jan 8, 2025

Closed in favor of:

@chalin chalin closed this Jan 8, 2025
@froboy froboy deleted the patch-1 branch January 8, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display content of blog index or blog-section index

3 participants