技術書への寄稿方法
技術書の書き方について記載します。
GitHubに招待してもらう
ナイトウ.icon or kouno.iconに声をかけてください
Issueを立てる
記事を書く
できれば執筆用のブランチを作ってプルリクを立てる
わからないことがあればkouno.iconまで
記事の追加方法詳細
./book/manuscripts/your-name/your-topic/index.mdを追加する
ここに記事を書いていく
./book/vivliostyle.config.jsに上記で作ったファイルを追加する
ここで書いたものがhtmlに変換されて記事になります
./book/index/index.mdに相対パスでリンクを設定する
ここで書いたものが目次に表示されます
ファイルの拡張子はmd => htmlにする
特有の記法について
基本的に ./book/manuscripts/kouno/sample/index.mdを参考にしてください。
タイトル、寄稿者名
code:index.md
<div class="doc-header">
<h1>『氷菓』の心理的安全性と多重解決ミステリ</h1>
<div class="doc-author">こうの( @hk_it7 )</div>
</div>
画像
code:index.md
!ブログ(後期クイーン的問題とシステム設計)のQRコード(../images/qrcode_hk-it_blog_queen.png){width=100}
![注釈](画像への相対パス){option}
注釈
code:index.md
<span class="footnote">著者:米澤穂信 (https://www.hanmoto.com/bd/isbn/9784044271015)</span>
spanタグの中がfootnoteになります。
著者紹介ページ
./book/manuscripts/authers/index.mdに記載します。
他の著者のものを真似て書いてください。
Gitの基本的な操作方法
ローカルにクローンする
code:git_clone_to_local.sh
git clone https://github.com/toukatsu-dev/repo_name.git
repo_name: 技書博12用なら gishohaku-12
つまりこうなる
code:git_clone_to_local_gishohaku-12.sh
git clone https://github.com/toukatsu-dev/gishohaku-12.git
ブランチを作る
code:git_create_branch.sh
git switch -c 'branch_name'
ブランチ名はfeature/title_english_nameみたいなのが良さそう。違っても問題ないです。
次は古いやり方。↑のやり方でそんなコマンドないって言われたらこっちで。
code:git_create_branch_old_style.sh
git checkout -b 'branch_name'
ステージに追加する
code:git_add_stage.sh
git add .
変更をコミットする
code:git_commit.sh
git commit -m 'commit message'
変更をpushする
code:git_push.sh
git push origin branch_name
mainブランチに戻す
code:git_to_main.sh
git checkout main
git pull
これ以外のことが必要になったらたぶん相談してもらったほうが良いです!
Git基礎