-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7899 from fjordllc/feature/add-atom-feed
外部公開ブログに atom フィードを追加
- Loading branch information
Showing
10 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
atom_feed do |feed| | ||
feed.title("ブログ | FJORD BOOT CAMP(フィヨルドブートキャンプ)") | ||
feed.updated(@atom_articles.first.created_at) | ||
@atom_articles.each do |article| | ||
feed.entry(article) do |entry| | ||
entry.title(article.title) | ||
summary_html = md2html(article.summary) | ||
entry.summary(summary_html, type: 'html') | ||
body_html = md2html(article.body) | ||
entry.content(body_html, type: 'html') | ||
|
||
entry.author do |author| | ||
author.name(article.user.login_name) | ||
end | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ html.is-application lang='ja' | |
= stylesheet_link_tag 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/yakuhanjp_s-narrow.min.css', media: 'all' | ||
= stylesheet_link_tag 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap', media: 'all' | ||
= render '/head/fontawsome' | ||
link(rel='alternate' type='application/atom+xml' title='フィヨルドブートキャンプブログ' href='/articles.atom') | ||
= content_for(:head_last) if content_for?(:head_last) | ||
body.is-application#body(class="#{body_class}") | ||
= render 'google_analytics' if Rails.env.production? && !staging? | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,10 @@ html.is-application lang='ja' | |
= stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Source+Code+Pro', media: 'all' | ||
= stylesheet_link_tag 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/yakuhanjp_s-narrow.min.css', media: 'all' | ||
= render '/head/fontawsome' | ||
link(rel='alternate' type='application/atom+xml' title='フィヨルドブートキャンプブログ' href='/articles.atom') | ||
= content_for(:head_last) if content_for?(:head_last) | ||
- if defined?(@article) && @article.wip? | ||
meta name="robots" content="none" | ||
meta(name="robots" content="none") | ||
body.is-welcome#body class="#{body_class}" | ||
= render 'google_analytics' if Rails.env.production? && !staging? | ||
.wrapper | ||
|
This file contains 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
This file contains 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