Skip to content

docs: update topic to avoid displaying issue#772

Merged
juzhiyuan merged 1 commit intoapache:masterfrom
yzeng25:1125_CVE_EN_duplication
Nov 25, 2021
Merged

docs: update topic to avoid displaying issue#772
juzhiyuan merged 1 commit intoapache:masterfrom
yzeng25:1125_CVE_EN_duplication

Conversation

@yzeng25
Copy link
Copy Markdown
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
Copy Markdown
Member

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

@yzeng25
Copy link
Copy Markdown
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 juzhiyuan requested a review from bzp2010 November 25, 2021 04:33
@juzhiyuan
Copy link
Copy Markdown
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