From 36525b8dcaee3955ab391808cb6699c3a2e9cad1 Mon Sep 17 00:00:00 2001 From: Aiden-Jeon Date: Thu, 9 Dec 2021 16:52:35 +0900 Subject: [PATCH 1/3] update --- .pre-commit-config.yaml | 7 +++++++ assets/scss/common/_variables.scss | 15 ++++++++++----- python/lint_markdown.py | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100755 python/lint_markdown.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06fb8665..6cdbc8eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,3 +9,10 @@ repos: - id: mixed-line-ending - id: check-added-large-files args: ["--maxkb=1000"] + + - repo: local + hooks: + - id: lint markdwon + name: lint markdwon + entry: python python/lint_markdown.py + language: system diff --git a/assets/scss/common/_variables.scss b/assets/scss/common/_variables.scss index 0baa1ece..cd14fe6c 100644 --- a/assets/scss/common/_variables.scss +++ b/assets/scss/common/_variables.scss @@ -77,11 +77,16 @@ $link-decoration: none; // Define the maximum width of `.container` for different screen sizes. $container-max-widths: ( - sm: 540px, - md: 720px, - lg: 960px, - xl: 1240px, - xxl: 1320px + // sm: 540px, + // md: 720px, + // lg: 960px, + // xl: 1240px, + // xxl: 1320px + sm: 960px, + md: 1240px, + lg: 1320px, + xl: 1540px, + xxl: 1660px ); @include _assert-ascending($container-max-widths, "$container-max-widths"); diff --git a/python/lint_markdown.py b/python/lint_markdown.py new file mode 100755 index 00000000..62836d8e --- /dev/null +++ b/python/lint_markdown.py @@ -0,0 +1,24 @@ +from pathlib import Path + + +REPO_PATH = Path(__file__).parent.parent +CONTENT_PATH= REPO_PATH / "content" / "en" + +def trim_trailing_spaces(): + for md_path in CONTENT_PATH.rglob("*.md"): + print(md_path) + with open(md_path, "r") as file_reader: + lines = [] + for line in file_reader: + if line: + line = line.rstrip() + lines += [line] + if len(lines) > 0: + with open(md_path, "w") as file_writer: + file_writer.write("\n".join(lines)) + if lines[-1] != "\n": + file_writer.write("\n") + + +if __name__ == "__main__": + trim_trailing_spaces() From 2183bbe4ecd73a9d6c68cf9dafab13bf9013262e Mon Sep 17 00:00:00 2001 From: Jongseob Jeon Date: Thu, 9 Dec 2021 17:35:22 +0900 Subject: [PATCH 2/3] Delete lint_markdown.py --- python/lint_markdown.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 python/lint_markdown.py diff --git a/python/lint_markdown.py b/python/lint_markdown.py deleted file mode 100755 index 62836d8e..00000000 --- a/python/lint_markdown.py +++ /dev/null @@ -1,24 +0,0 @@ -from pathlib import Path - - -REPO_PATH = Path(__file__).parent.parent -CONTENT_PATH= REPO_PATH / "content" / "en" - -def trim_trailing_spaces(): - for md_path in CONTENT_PATH.rglob("*.md"): - print(md_path) - with open(md_path, "r") as file_reader: - lines = [] - for line in file_reader: - if line: - line = line.rstrip() - lines += [line] - if len(lines) > 0: - with open(md_path, "w") as file_writer: - file_writer.write("\n".join(lines)) - if lines[-1] != "\n": - file_writer.write("\n") - - -if __name__ == "__main__": - trim_trailing_spaces() From cd518753577b309131b50de9a7a92b8f507938d6 Mon Sep 17 00:00:00 2001 From: Jongseob Jeon Date: Thu, 9 Dec 2021 17:35:44 +0900 Subject: [PATCH 3/3] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6cdbc8eb..06fb8665 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,10 +9,3 @@ repos: - id: mixed-line-ending - id: check-added-large-files args: ["--maxkb=1000"] - - - repo: local - hooks: - - id: lint markdwon - name: lint markdwon - entry: python python/lint_markdown.py - language: system