Browse Source

Add some simple RSS feed to Music Monday

master
parent
commit
e615549d6c
9 changed files with 44 additions and 7 deletions
  1. +4
    -0
      config.rb
  2. +1
    -1
      source/_music-monday-youtube-video.erb
  3. BIN
      source/img/feed-icon-28x28.png
  4. +2
    -1
      source/music-monday/page.html.erb
  5. +1
    -1
      source/music-monday/posts/2019-01-14-killing-a-camera.html.erb
  6. +1
    -1
      source/music-monday/posts/2019-05-06-cancion-juridica.html.erb
  7. +1
    -1
      source/music-monday/posts/2019-05-13-spaceman.html.erb
  8. +2
    -2
      source/music-monday/posts/2019-06-17-be-quiet-and-drive.html.erb
  9. +32
    -0
      source/music-monday/rss-feed.xml.erb

+ 4
- 0
config.rb View File

@@ -53,6 +53,10 @@ proxy "/music-monday/index.html", "music-monday/page.html", :ignore => true, :lo
:posts => POSTS[0...POSTS_PER_PAGE]
}

proxy "/music-monday/rss.xml", "music-monday/rss-feed.xml", :ignore => true, :locals => {
:posts => POSTS[0...POSTS_PER_PAGE]
}

###
# Helpers
###


+ 1
- 1
source/_music-monday-youtube-video.erb View File

@@ -3,6 +3,6 @@
src="https://www.youtube-nocookie.com/embed/<%= youtube_id %>"
frameborder="0" allow="accelerometer; autoplay;
encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
allowfullscreen="allowfullscreen"></iframe>
<figcaption><a target="_blank" href="https://youtu.be/<%= youtube_id %>"><%= title %></a></figcaption>
</figure>

BIN
source/img/feed-icon-28x28.png View File

Before After
Width: 28  |  Height: 28  |  Size: 1.7KB

+ 2
- 1
source/music-monday/page.html.erb View File

@@ -3,7 +3,8 @@ layout: music-monday
---

<header>
<h1>Music Monday</h1>
<h1>Music Monday
<a href="/music-monday/rss.xml"><img src="/img/feed-icon-28x28.png" /></a></h1>

<p>Music Monday is a series of music posts by me (Esteban Manchado),
published on Mondays, which feature a song and a brief explanation


+ 1
- 1
source/music-monday/posts/2019-01-14-killing-a-camera.html.erb View File

@@ -7,7 +7,7 @@ layout: music-monday-post
<p>Today we have an example of <a href="https://en.wikipedia.org/wiki/Tuplet">triplets</a>. Listen to the melody of the voice at 1:10 (triplet 1: “came-ras we're”; triplet 2: “low-er-ing”):</p>

<figure class="song">
<iframe style="border: 0; width: 100%; height: 120px;" src="https://bandcamp.com/EmbeddedPlayer/album=2854929620/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/artwork=small/track=3990901186/transparent=true/" seamless><a href="http://braid.bandcamp.com/album/frame-and-canvas">Frame and Canvas by Braid</a></iframe>
<iframe style="border: 0; width: 100%; height: 120px;" src="https://bandcamp.com/EmbeddedPlayer/album=2854929620/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/artwork=small/track=3990901186/transparent=true/" seamless="seamless"><a href="http://braid.bandcamp.com/album/frame-and-canvas">Frame and Canvas by Braid</a></iframe>
</figure>

<p>What does this mean? Normally, how much a note measures (in


+ 1
- 1
source/music-monday/posts/2019-05-06-cancion-juridica.html.erb View File

@@ -13,7 +13,7 @@ layout: music-monday-post
music</a>):</p>

<figure class="song">
<audio controls
<audio controls="controls"
src="/music-monday/Bossa%20Nova.mp3"></audio>
</figure>



+ 1
- 1
source/music-monday/posts/2019-05-13-spaceman.html.erb View File

@@ -15,7 +15,7 @@ layout: music-monday-post
<figure class="song">
<iframe style="border: 0; width: 100%; height: 120px;"
src="https://bandcamp.com/EmbeddedPlayer/album=164786656/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/artwork=small/track=124815471/transparent=true/"
seamless><a href="http://deadstairs.bandcamp.com/album/variations">Variations
seamless="seamless"><a href="http://deadstairs.bandcamp.com/album/variations">Variations
by Dead Stairs</a></iframe>
</figure>



+ 2
- 2
source/music-monday/posts/2019-06-17-be-quiet-and-drive.html.erb View File

@@ -9,7 +9,7 @@ layout: music-monday-post
before another one. Listen to 0:05 and 0:10 in this example:</p>

<figure class="song">
<audio controls
<audio controls="controls"
src="/music-monday/Be%20Quiet%20And%20Drive%20drum%20excerpt.mp3"></audio>
</figure>

@@ -29,7 +29,7 @@ layout: music-monday-post
<figure class="song">
<iframe style="border: 0; width: 100%; height: 120px;"
src="https://bandcamp.com/EmbeddedPlayer/album=2854929620/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/artwork=small/track=3453531205/transparent=true/"
seamless><a href="http://braid.bandcamp.com/album/frame-and-canvas">Frame
seamless="seamless"><a href="http://braid.bandcamp.com/album/frame-and-canvas">Frame
and Canvas by Braid</a></iframe>

</figure>


+ 32
- 0
source/music-monday/rss-feed.xml.erb View File

@@ -0,0 +1,32 @@
---
layout: false
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Music Monday</title>
<description>Music Monday is a series of music posts by Esteban Manchado, published on Mondays, which feature a song and a brief explanation of why the author thinks song is cool, or of some musical concept.</description>
<link>http://music.hcoder.org/music-monday/</link>
<pubDate><%= Date.parse(posts[0].sub(/.*posts\//, '').
sub(/-[^-]*\.html\.erb/, '')).strftime("%B %e, %Y") %></pubDate>
<lastBuildDate><%= Date.parse(posts[0].sub(/.*posts\//, '').
sub(/-[^-]*\.html\.erb1/, '')).strftime("%a, %d %b %Y %T %z") %></lastBuildDate>
<generator>Middleman</generator>

<% posts.each do |post| %>
<item>
<title><%= Date.parse(post.sub(/.*posts\//, '').
sub(/-[^-]*\.html\.erb/, '')).strftime("%B %e, %Y") %></title>
<description><%= h(partial post.sub(/source\//, ''), :locals => {
:path => post,
:link => post,
:date => Date.parse(post.sub(/.*posts\//, '').
sub(/-[^-]*\.html\.erb/, '')).strftime("%B %e, %Y")
}) %></description>
<pubDate><%= Date.parse(post.sub(/.*posts\//, '').
sub(/-[^-]*\.html\.erb3/, '')).strftime("%a, %d %b %Y %T %z") %></pubDate>
<link>http://music.hcoder.org/<%= post.sub(/source\//, '').sub(/\.erb$/, '') %></link>
</item>
<% end %>
</channel>
</rss>

Loading…
Cancel
Save