-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add some checks for blog repo #579
Conversation
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
@YiniXu9506 PTAL |
.github/workflows/ci.yml
Outdated
- name: Verify internal links | ||
run: ./hack/verify-links-doc.sh | ||
# the script reports "#top" as dead anchor. | ||
# - name: Verify internal link anchors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to verify internal link anchors
, if yes, uncomment this step, otherwise, remove file hack/verify-link-anchors.sh
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We need to verify internal link anchors
.
But currently, we have lots of #top
anchors in old blog articles (e.g. https://pingcap.com/blog/2017-07-11-tidbinternal1#top), which are not regular markdown anchors and are thus reported "dead anchor" by this script.
I will find a workaround to address this issue. But before that, I had to comment out this step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. The #top is a useless anchor, I think you can remove it directly.
hack/verify-links-doc.sh
Outdated
trap 'rm -f $CONFIG_TMP $ERROR_REPORT' EXIT | ||
|
||
# Check all directories starting with 'v\d.*' and dev. | ||
for d in zh en; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no folders named zh
and en
, so we need to add the for loop here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Ran <huangran@pingcap.com> fix script Signed-off-by: Ran <huangran@pingcap.com> add markdown-link-check.tpl Signed-off-by: Ran <huangran@pingcap.com> fix replacementpatterns Signed-off-by: Ran <huangran@pingcap.com> fix a single quote in filename Signed-off-by: Ran <huangran@pingcap.com> fix wrong replacementpatterns Signed-off-by: Ran <huangran@pingcap.com> test verify-links.sh Signed-off-by: Ran <huangran@pingcap.com> fix again script Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
@YiniXu9506 PTAL. Thanks! |
Signed-off-by: Ran <huangran@pingcap.com> fix manual link breaks Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
Signed-off-by: Ran <huangran@pingcap.com>
@@ -0,0 +1,52 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this shell file is the same as /hack/verify-link
, which is also removed from circleci task, so you can keep this and remove that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done~
@@ -0,0 +1,15 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seem this shell file is the same as hack/markdown-link-check.json
, you can keep this and remove that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done~
Signed-off-by: Ran <huangran@pingcap.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR made the following changes:
#top
as a dead link.)Related issue: #577