Skip to content

Commit

Permalink
mdformat
Browse files Browse the repository at this point in the history
  • Loading branch information
7rikazhexde committed Sep 18, 2023
1 parent c1016e0 commit 65c5123
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 179 deletions.
17 changes: 17 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Reference : https://github.com/markdownlint/markdownlint/blob/main/docs/creating_rules.md
//"MD007": false, // Unordered list indentation / 番号なしリストのインデント
//"MD009": false, // Trailing spaces / 末尾のスペース
//"MD010": false, // Hard tabs / インデントのタブ
"MD013": false, // Line length / 行の長さ
//"MD014": false, // Dollar signs used before commands without showing output / コマンドの前にドル記号を使用して出力を表示しない
// コードブロックでコマンドライン(bash/zsh)を書く場合、コピー&ペーストを考慮すると、
// "$"や"%"は表示しない方が良いので警告を有効にする。(見た目重視であれば無効にする。)
"MD024": false, // Multiple headings with the same content / 同じ内容の複数の見出し
"MD025": false, // Multiple top-level headings in the same document / 同じドキュメント内の複数のトップレベルの見出し
"MD026": false, // Trailing punctuation in heading / 見出しの末尾の句読点
"MD033": false // Inline HTML / raw HTMLの記入
// MD009を無効にする変わりに改行に<br/>を使用するため無効にする。
//"MD040": false // Fenced code blocks should have a language specified / フェンスされたコードブロックには言語を指定する必要があります
// 言語に問わずハイライトした方が良いので有効にする。
}
32 changes: 25 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,32 @@ repos:
verbose: true
files: ^pyproject\.toml$

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
#- repo: https://github.com/executablebooks/mdformat
# rev: 0.7.17
# hooks:
# - id: mdformat
# additional_dependencies:
# - mdformat-admon
# - mdformat-footnote
# - mdformat-frontmatter

# Reference: https://github.com/DavidAnson/markdownlint-cli2#overview
# > markdownlint-cli is a traditional command-line interface for markdownlint.
#- repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.36.0
# hooks:
# - id: markdownlint
# args: ["--fix", "--config", ".markdownlint.jsonc"]

# Reference: https://github.com/DavidAnson/markdownlint-cli2#overview
# > markdownlint-cli2はmarkdownlint用の少し型破りなコマンドラインインターフェイスです。
# > markdownlint-cli2は設定ベースで、速度とシンプルさを優先しています。
# > markdownlint-cli2はmarkdownlint-cliのすべての機能をサポートしています(少し異なる場合もあります)。
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.10.0
hooks:
- id: mdformat
additional_dependencies:
- mdformat-admon
- mdformat-footnote
- mdformat-frontmatter
- id: markdownlint-cli2
args: ["--fix", "--config", ".markdownlint.jsonc"]

# Repository local hooks
- repo: local
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
// ファイル保存時にフォーマットする
"editor.formatOnSave": true,
// フォーマット対象をファイルタイプで指定する
// Markdownファイルは無効
"[markdown]": {
"editor.formatOnSave": true
"editor.formatOnSave": false
},
"eslint.codeActionsOnSave.rules": null
}
1 change: 0 additions & 1 deletion docs/programming-language/python/mdformat-tips.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ As a result, the intended display was confirmed without conversion by mdformat.
!!! info
[The project page states](https://github.com/KyleKing/mdformat-admon#caveats) that as of 2023/08/12, only mkdocs are supported as follows<br/>
In the future, they plan to support GitHub admonitions.<br/>
> This plugin currently only supports admonitions that start with !!! ... and won't modify admonitions for Github, which should cover most use cases. Future work is planned for other types.
1 change: 0 additions & 1 deletion docs/programming-language/python/mdformat-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ mkdocs serveを実行すると、admonitionsの表示は下記のようになり
!!! info
2023/08/12時点では以下の通りサポート対象はmkdocsのみとのことです。<br/>
将来的にはGitHubのadmonitionsにも対応予定とのことです。<br/>
> This plugin currently only supports admonitions that start with !!! ... and won't modify admonitions for Github, which should cover most use cases. Future work is planned for other types.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "A repository that gathers insights and tips for development. It a
license = "MIT"
name = "dev-insights-tips"
readme = "README.md"
version = "0.1.44"
version = "0.1.45"

[tool.poetry.dependencies]
mdformat = "^0.7.16"
Expand Down
3 changes: 0 additions & 3 deletions sample/index.ja.md

This file was deleted.

3 changes: 0 additions & 3 deletions sample/index.md

This file was deleted.

Binary file removed sample/sample/images/DevelopmentAndDeployment.en.png
Binary file not shown.
Binary file removed sample/sample/images/DevelopmentAndDeployment.ja.png
Binary file not shown.
Binary file removed sample/sample/images/DirectoryStructure.en.png
Binary file not shown.
Binary file removed sample/sample/images/DirectoryStructure.ja.png
Binary file not shown.
Binary file removed sample/sample/images/MoveConfigDirectory.en.png
Binary file not shown.
Binary file removed sample/sample/images/MoveConfigDirectory.ja.png
Binary file not shown.
3 changes: 0 additions & 3 deletions sample/sample/index.en.md

This file was deleted.

3 changes: 0 additions & 3 deletions sample/sample/index.ja.md

This file was deleted.

78 changes: 0 additions & 78 deletions sample/sample/page1.en.md

This file was deleted.

78 changes: 0 additions & 78 deletions sample/sample/page1.ja.md

This file was deleted.

Binary file modified site/sitemap.xml.gz
Binary file not shown.

0 comments on commit 65c5123

Please sign in to comment.