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

docs: update topic to avoid displaying issue #772

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

yzeng25
Copy link
Contributor

@yzeng25 yzeng25 commented Nov 25, 2021

Fixes: #771

Changes:

Currently, the website displays two identical articles on the first page of blog.

After some researching and testing, I find the cause of this problem. While it is completely fine to post multiple articles in the same date directory, the title of articles under the same directory must be identical and unique.

In other words, when adding two or more articles in the same date directory, you need to make sure each article's title must be different.

This problem is caused by two articles with the same title.

image

image

After updating the title of an article, then yarn start run it locally, it works out fine.

image

In addition, I also checked the files in apisix-website/website/i18n/zh/docusaurus-plugin-content-blog/2021/11/23/ directory and run it locally. It works fine, so there is no need to modify files in this directory.

For future changes, if you are adding two or more articles in the same date directory, please make sure they have different title. Use yarn start to run it locally before submission is also suggested.

@yzeng25 yzeng25 marked this pull request as ready for review November 25, 2021 03:09
@juzhiyuan
Copy link
Member

Good catch!! This may be a bug from Docusaurus?

@yzeng25
Copy link
Contributor Author

yzeng25 commented Nov 25, 2021

Good catch!! This may be a bug from Docusaurus?

Well, not necessarily.

It is most people's first instinct to look at file names when the above problem occurs.

File name is used to generate urls, thus duplicated file names is prohibited from the very beginning, i.e. creating two files with the same file names in the same directory is not allowed.

But if you take a step back and have a look: in what kind of scenario would a person create two or more articles with the same title? Basically none except done by accident.

With this being said, each article has a unique title is a very common-sense thing. I would rather call this a human-like thinking logic than a bug.

@juzhiyuan
Copy link
Member

I would rather call this a human-like thinking logic than a bug.

😄

@juzhiyuan juzhiyuan merged commit ee6a801 into apache:master Nov 25, 2021
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.

Bug: display Blog(EN) page has two duplicate articles
7 participants