From 777451fc893e35052b5602a6498c84471547e752 Mon Sep 17 00:00:00 2001 From: Daisuke Date: Fri, 16 May 2025 20:33:16 +0900 Subject: [PATCH 1/2] Add an article on Docstring --- src/blog/post-3.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/blog/post-3.md diff --git a/src/blog/post-3.md b/src/blog/post-3.md new file mode 100644 index 0000000..720a32c --- /dev/null +++ b/src/blog/post-3.md @@ -0,0 +1,14 @@ +--- +title: 'Why I Write Docstrings' +pubDate: 2025-05-16 +author: 'Nakahara Daisuke' +tags: ["programming"] +--- + +I try to write docstrings as much as possible for two main reasons. +First, they help reviewers understand the roles of functions and classes. +Second, I believe that clear, detailed docstrings can enable AI tools to generate code more effectively. + +Although I sometimes make mistakes in my docstrings, +I think that even imperfect documentation is better than none. +Moreover, both reviewers and AI tools can help identify and correct these errors. From 1bd79e9caaf188a6ff9a69a334c07e2d26c80eee Mon Sep 17 00:00:00 2001 From: Daisuke Date: Fri, 16 May 2025 20:38:52 +0900 Subject: [PATCH 2/2] Add `line-height` in `markdown-content` --- src/layouts/MarkdownPostLayout.astro | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/layouts/MarkdownPostLayout.astro b/src/layouts/MarkdownPostLayout.astro index 0e7a037..af007b0 100644 --- a/src/layouts/MarkdownPostLayout.astro +++ b/src/layouts/MarkdownPostLayout.astro @@ -48,18 +48,19 @@ const optionsForDate = { } .markdown-content { - font-family: sans-serif; - font-size: 1.2rem; + font-family: sans-serif; + font-size: 1.2rem; + line-height: 2.5; } .markdown-content h1 { - font-size: 1.9rem; + font-size: 1.9rem; } .markdown-content h2 { - font-size: 1.75rem; + font-size: 1.75rem; } .markdown-content h3 { - font-size: 1.5rem; + font-size: 1.5rem; }