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: html to markdown #5853

Merged
merged 2 commits into from
May 28, 2022
Merged

docs: html to markdown #5853

merged 2 commits into from
May 28, 2022

Conversation

YangFong
Copy link
Contributor

No description provided.

@YangFong YangFong requested a review from a team as a code owner May 27, 2022 12:22
@YangFong YangFong requested review from yin1999 and removed request for a team May 27, 2022 12:22
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label May 27, 2022
@yin1999
Copy link
Member

yin1999 commented May 27, 2022

please read markdown in mdn first, it will help you to understand how to convert a html to markdown.

Then, the covnertion should have two commits (Ref: #5812):

  1. rename the html file to markdown file, using git mv /path/to/html /path/to/md
  2. convert the content from html to markdown.

files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
files/zh-cn/web/html/element/hr/index.md Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented May 28, 2022

Preview URLs

Flaws

URL: /zh-CN/docs/Web/HTML/Element/hr
Title: <hr>
on GitHub
Flaw count: 3

  • macros:
    • /zh-CN/docs/Web/API/HTMLHRElement does not exist but fell back to /en-US/docs/Web/API/HTMLHRElement
  • broken_links:
    • Can't resolve /zh-CN/docs/CSS
  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

External URLs

URL: /zh-CN/docs/Web/HTML/Element/hr
Title: <hr>
on GitHub

No new external URLs

(this comment was updated 2022-05-28 12:02:17.988949)

@YangFong
Copy link
Contributor Author

不太简单,需要考虑的事情不少

@yin1999
Copy link
Member

yin1999 commented May 28, 2022

因为这是一个 html to markdown 转换的pr,为保持文档的修改记录,需要将 commit 拆分为 2 个:

  1. 第一个commit,将html文件重命名为markdown文件(运行命令 git mv /path/to/html /path/to/markdown
  2. 第二个commit,将文件的内容转换为 markdown。

若对此感到困难,可以另开 PR,或由我协助完成本次 convertion。

@YangFong
Copy link
Contributor Author

@yin1999 是要将过程浓缩为两次 commit 吗,那么这一个 PR 该怎么算。

@yin1999
Copy link
Member

yin1999 commented May 28, 2022

@yin1999 是要将过程浓缩为两次 commit 吗,那么这一个 PR 该怎么算。

是的,而且第一个commit需要是文件重命名(使用 git mv 命令)

@YangFong
Copy link
Contributor Author

@yin1999 那么,是重新开一个 PR,还是在此基础上进行修改。

@yin1999
Copy link
Member

yin1999 commented May 28, 2022

@yin1999 那么,是重新开一个 PR,还是在此基础上进行修改。

都可以,如果是在本pr的基础上修改,可通过以下的方式进行:

  1. 首先复制 markdown 文件中的所有内容到其它文件
  2. 运行命令 git reset HEAD~5 --hard 撤销最近的 5 次 commit
  3. 运行命令 git mv files/zh-cn/web/html/element/hr/index.html files/zh-cn/web/html/element/hr/index.md 将文件重命名为 markdown 文件,并提交 commit
  4. 打开重命名后的 markdown 文件,将复制的 markdown 文件内容粘贴到文件中,保存并提交 commit
  5. 使用命令 git push origin --force 强制推送到远程仓库

如果对此还不太熟悉,我可以协助完成

@yin1999 yin1999 merged commit 65ee26d into mdn:main May 28, 2022
@YangFong YangFong deleted the hr-transition branch May 28, 2022 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants