各号目次をサイドバーに表示する#665
Draft
zunda wants to merge 4 commits into
Draft
Conversation
各号文字のフロントマターにその号の記事を列挙して、各号目次とサイドバーの目次を生成できないか実験しています。できなくはなさそう。 今後、各号目次とサイドバー目次の内容を充実・整理していきます。
6b585f1 to
7771e71
Compare
Contributor
既知の表示の話なので、zundaさん聞きたい「ご意見」とちょっと違いそうだなと承知の上で以下コメントします🙏(このPRのコードや生成されたサイドバーを見ていて思ったので...) サイドバーには「最新号」がなくて、最新号も「バックナンバー」扱いになっているなということに気づいて、気づいたら直したくなってきました😅 例えば、今現在のるびまトップのコンテンツでは0065号が「最新号」となっているのにサイドバーでは「バックナンバー」にあります。 で、何が言いたいかというと、各号の目次をサイドバーに表示するのはめちゃくちゃNiceと思いました!それに加えて「最新号」のくくりもサイドバーに設けるのはどうかなと。 いかがでしょう?? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#406 を眺めていて、各号目次と同時にサイドバーの目次を生成できないか試してみたくなりました。お気軽にご意見をお願いします!
残作業
,区切りは https://github.com/rubima/magazine.rubyist.net/blob/master/doc/editing_policy.md#句読点 に違反していそう現状
git switch zunda/show-toc-on-sidebarしてbundle exec jekyll serve -I --futureして、ブラウザで0065号の表紙や巻頭言を閲覧することで確認できます。/_includes/index_toc.mdで表紙の目次を、/_includes/sidebar.htmlでサイドバーの目次を生成しています。表紙
「目次」以下の目次部分は表紙の原稿のフロントマターなどから生成しています。各記事の原稿のフロントマターからtitleを取得していて、空白の挿入規則などに従っていないものもあります。
巻頭言
サイドバーに0065号の目次が挿入されています。従来のバックナンバーは下の方に移動されています。
First Step Ruby
この記事は複数の号から参照されているのでサイドバーに各号目次が表示されません。
このプルリクエストの古くなったコメント
最新号の目次ではなく閲覧中の号の目次を表示した方が直感的だと感じているので、いまのところ閲覧中の号の目次を表示する方向で試しています。この場合、Rubyist Magazine常設記事であるFirstStepRubyのサイドバーには各号目次は表示されません。
最初のコミット d4cfebe では、各号目次のフロントマターにその号の記事を列挙して、各号目次とサイドバーの目次を生成できそうな感触を得ました。各号目次のフロントマターにその号の記事が列挙されていない場合にはサイドバーに各号目次は表示されません。
今後、各号目次とサイドバー目次の内容を充実・整理していきます。