Skip to content

Blog support #99

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

Open
nighca opened this issue Mar 6, 2025 · 7 comments
Open

Blog support #99

nighca opened this issue Mar 6, 2025 · 7 comments

Comments

@nighca
Copy link
Collaborator

nighca commented Mar 6, 2025

No description provided.

@luoliwoshang
Copy link

luoliwoshang commented Mar 8, 2025

Like Go's official blog system (References: https://go.dev/blog/ and https://github.com/golang/website)

Blog List Page

Path: goplus.org/blog/
Like https://go.dev/blog/

  • Display recent blog posts in reverse chronological order
  • Each list item should include:
    • Title
    • Date
    • Author
    • Summary
      "More articles" button/link that leads to the complete blog list

Path: goplus.org/blog/all
Like https://go.dev/blog/all

  • Display all blog posts in a list format

Blog Post Format

Following Go's blog post structure, each blog post should be written in Markdown with a metadata header:

---
title: "Post Title"
date: YYYY-MM-DD HH:mm
by:
- Author Name
summary: Brief description of the post.
---

Post content...

The Go website sorts blog posts based on the Date field in their metadata, using the YYYY-MM-DD format. While this approach includes a secondary sort by title, it may not always reflect the precise posting order.

https://github.com/golang/website/blob/master/cmd/golangorg/godev.go

Although introducing an ID field could solve this, it would add unnecessary cognitive overhead for post authors.
I believe the current time-based sorting offers a significant advantage: it allows authors to write posts in a natural Markdown style (despite requiring metadata), similar to how they would write any other Markdown document.
However, I suggest using the YYYY-MM-DD HH:mm format for the date field. This would:

  • Provide more precise sorting while maintaining chronological order
  • Not increase cognitive load for authors (they just need to include the posting time)
  • Preserve the simplicity of the current metadata approach

Blog Detail Page

Path: goplus.org/blog/[md_name]
Like https://go.dev/blog/swisstable
Renders the corresponding md_name.md file
Includes navigation links to previous and next blog posts

Image Handling

Two approaches for handling images in blog posts:
1.Standard Markdown Format (Current GoPlus approach):

![Image description](path/to/image.png)
  1. HTML Format (Go's blog approach):
<div class="image"><div class="centered">
<figure>
<img src="path/to/image.png" alt="Image description"/>
</figure>
</div></div>

Note: For now, maintain the current markdown image syntax without modification. Use default styling for markdown images.

Expect Markdown source structure

in /goplus.org/public/blog/

blog/
├── 6years.md                                    # Blog post without images
├── community-outreach-working-group.md          # Blog post without images
├── fuzz-beta.md                                 # Blog post without images
├── 6years/                                      # Resources for 6years.md
│   ├── growth-chart.png
│   └── community-stats.svg
├── community-outreach-working-group/            # Resources for community post
│   └── team-structure.png
└── fuzz-beta/                                   # Resources for fuzz post
    ├── benchmark.png
    └── workflow.svg

@nighca
Copy link
Collaborator Author

nighca commented Mar 10, 2025

However, I suggest using the YYYY-MM-DD HH:mm format for the date field

It is better to include timezone info in date.

in /goplus.org/public/blog/

The public/ folder exposes its contents directly. Markdown files (*.md), being closer to code requiring processing, it may be better to place them elsewhere.

Note: For now, maintain the current markdown image syntax without modification. Use default styling for markdown images.

Implementing image embedding with arbitrary relative paths might present challenges in building & deploying. Let's try it first and then determine if extra path restrictions are necessary.

@luoliwoshang
Copy link

However, I suggest using the YYYY-MM-DD HH:mm format for the date field

It is better to include timezone info in date.

using the format YYYY-MM-DD HH:mm±HH:mm for standardizing date and time notation

2024-03-21 14:30:00+08:00

The public/ folder exposes its contents directly. Markdown files (*.md), being closer to code requiring processing, it may be better to place them elsewhere.

maybe in the /goplus.org/blog

@nighca
Copy link
Collaborator Author

nighca commented Mar 10, 2025

using the format YYYY-MM-DD HH:mm±HH:mm for standardizing date and time notation

2024-03-21 14:30:00+08:00

LGTM

maybe in the /goplus.org/blog

I recommend /goplus.org/articles, because not all content related to "blog" will be placed in this folder.

For example, I thought the React component for page blog-article & blog-article-list will reside under /goplus.org/pages.

@luoliwoshang
Copy link

For example, I thought the React component for page blog-article & blog-article-list will reside under /goplus.org/pages.

LGTM

I recommend /goplus.org/articles, because not all content related to "blog" will be placed in this folder.

if suggestion means placing blog.md files under /goplus/articles/blog, and the articles directory would contain other types of content in their respective subdirectories, like this:

/goplus
└── articles/
    ├── blog/
    │   ├── blog1.md
    │   └── blog2.md
    ├── releases/
    │   ├── v1.0.0.md
    │   └── v1.1.0.md
    ├── tutorials/
    │   ├── getting-started.md
    │   └── advanced-usage.md
    ├── docs/
    │   ├── installation.md
    │   └── configuration.md
    └── news/
        ├── announcement1.md
        └── announcement2.md

And when users visit goplus.org/blog/all, would it only display the content from /goplus.org/articles/blog directory?

@nighca
Copy link
Collaborator Author

nighca commented Mar 10, 2025

if suggestion means placing blog.md files under /goplus/articles/blog

I intend articles to hold only blog posts (short for blog-articles).

/goplus
└── articles/
    └── *.md

We can introduce subdirectories as needed in the future (while not neccessary now), which then results in:

/goplus
└── articles/
    ├── blog/*.md
    ├── releases/*.md
    └── news/*.md

And when users visit goplus.org/blog/all, would it only display the content from /goplus.org/articles/blog directory?

If sub-directories exist, yes.

@luoliwoshang
Copy link

luoliwoshang commented Mar 10, 2025

I intend articles to hold only blog posts (short for blog-articles).

I got it

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

No branches or pull requests

2 participants