📝 Add internal Dojo API to write News article much easier#1433
Merged
Conversation
下記お知らせ記事の「寄贈先の CoderDojo 一覧」を簡単に作りたい。 与えられた Dojo 名と一致した Dojo のリンク付きテキストを返し、 今後同様のセクションを作るときは本 API で Dojo 一覧のリストを用意する。 「CoderDojo 一覧」が用意されているお知らせ記事の例 https://news.coderdojo.jp/2022/05/16/1500-microbits-to-coderdojo/
yasulab
added a commit
that referenced
this pull request
May 17, 2022
yasulab
added a commit
that referenced
this pull request
May 17, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
yasulab
added a commit
that referenced
this pull request
May 18, 2022
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.
下記お知らせ記事の「寄贈先の CoderDojo 一覧」を簡単に作りたい。
「CoderDojo 一覧」が用意されているお知らせ記事の例
https://news.coderdojo.jp/2022/05/16/1500-microbits-to-coderdojo/
上記記事では「 手書き 」で用意したが、ケアレスミスが発生する可能性もあり、何より1つずつ参照・確認するのに1時間以上かかった。今後は本 API を活用して自動的に生成したい 😌 ✨ (楽したい... 😂)
そこで、与えられた Dojo 名と一致した Dojo のリンク付きテキストを返し、
今後同様のセクションを作るときは本 API で Dojo 一覧のリストを用意できるようにした。
Dojo API の出力例
GET /dojos.json{ name: "柏", url: "https://www.coderdojo-kashiwa.com/", prefecture: "関東", linked_text: "<a href='https://www.coderdojo-kashiwa.com/'>'柏</a>(関東)" }実行スクリプトと使い方
下記スクリプトを実行することでお知らせ記事に必要な HTML が取得できます。