about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHuy-Ngo <duchuy29092000@gmail.com>2021-01-11 15:13:50 +0700
committerHuy-Ngo <duchuy29092000@gmail.com>2021-01-11 15:13:54 +0700
commit3c4cfb45a33f4835f76893fde7198d132774b57c (patch)
tree46a6cc4ea479bac65835f871371a1a2000484fdf
parentadfa1dad82c1730f45f7176cda86c1dc42ef8c11 (diff)
downloadblog-3c4cfb45a33f4835f76893fde7198d132774b57c.tar.gz
Add webring
-rw-r--r--_config.yml2
-rw-r--r--_includes/custom-head.html1
-rw-r--r--_includes/custom-webring.html59
-rw-r--r--_includes/footer.html38
-rw-r--r--about.markdown3
-rw-r--r--assets/css/webring.scss21
-rwxr-xr-xcreate-webring.sh7
-rw-r--r--webring.template25
8 files changed, 155 insertions, 1 deletions
diff --git a/_config.yml b/_config.yml
index 4d0b8f5..b3e3562 100644
--- a/_config.yml
+++ b/_config.yml
@@ -68,3 +68,5 @@ exclude:
   - .git/
   - LICENSE
   - newpost.sh
+  - webring.template
+  - create-webring.sh
diff --git a/_includes/custom-head.html b/_includes/custom-head.html
index 75c6e2c..172ec27 100644
--- a/_includes/custom-head.html
+++ b/_includes/custom-head.html
@@ -1,3 +1,4 @@
+<link rel="stylesheet" href="/assets/css/webring.css">
 <link rel="apple-touch-icon" sizes="180x180" href="/assets/images/apple-touch-icon.png">
 <link rel="icon" type="image/png" sizes="32x32" href="/assets/images/favicon-32x32.png">
 <link rel="icon" type="image/png" sizes="16x16" href="/assets/images/favicon-16x16.png">
diff --git a/_includes/custom-webring.html b/_includes/custom-webring.html
new file mode 100644
index 0000000..b2dde84
--- /dev/null
+++ b/_includes/custom-webring.html
@@ -0,0 +1,59 @@
+<div class="wrapper">
+  <section class="webring">
+    <h2>
+      Articles from blogs I read
+      <small class="attribution">
+        Generated by
+        <a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
+      </small>
+    </h2>
+    <section class="footer-col-wrapper">
+      
+      <div class="footer-col article">
+        <h4 class="title">
+          <a href="https://stallman.org/archives/2020-nov-feb.html#10_January_2021_%28Anti-reality_extremists%27_call_for_violence%29" target="_blank" rel="noopener">Anti-reality extremists&#39; call for violence</a>
+        </h4>
+        <p class="summary">
+
+Anti-reality extremists were calling for violence in DC on Jan 6 for
+weeks before that date.
+
+
+*Extremists intensify calls for violence ahead of Inauguration Day.*
+
+
+</p>
+        <small class="source">
+          via <a href="https://stallman.org/archives/polnotes.html">Richard Stallman&#39;s Political Notes</a>
+        </small>
+        <small class="date">January 10, 2021</small>
+      </div>
+      
+      <div class="footer-col article">
+        <h4 class="title">
+          <a href="https://news.opensuse.org/2021/01/08/tw-rolls-into-the-new-year/" target="_blank" rel="noopener">Tumbleweed Rolls Into The New Year</a>
+        </h4>
+        <p class="summary">The holidays might be over and the new year is here, but users of openSUSE Tumbleweed didn’t see any difference in the amount of snapshots released over the holiday season. Tumbleweed snapshots have been rolling out daily before toasting to new beginnings…</p>
+        <small class="source">
+          via <a href="https://news.opensuse.org">openSUSE News</a>
+        </small>
+        <small class="date">January 8, 2021</small>
+      </div>
+      
+      <div class="footer-col article">
+        <h4 class="title">
+          <a href="https://drewdevault.com/2021/01/07/History-will-not-remember-us-fondly.html" target="_blank" rel="noopener">History will not remember us fondly</a>
+        </h4>
+        <p class="summary">Today, we recall the Middle Ages as an unenlightened time (quite literally, in
+fact). We view the Middle Ages with a critical eye towards its brutality, lack
+of individual freedoms, and societal and technological regression. But we rarely
+turn that same crit…</p>
+        <small class="source">
+          via <a href="https://drewdevault.com">Drew DeVault&#39;s blog</a>
+        </small>
+        <small class="date">January 7, 2021</small>
+      </div>
+      
+    </section>
+  </section>
+</div>
diff --git a/_includes/footer.html b/_includes/footer.html
new file mode 100644
index 0000000..ca0157a
--- /dev/null
+++ b/_includes/footer.html
@@ -0,0 +1,38 @@
+{%- include custom-webring.html -%}
+<footer class="site-footer h-card">
+  <data class="u-url" href="{{ "/" | relative_url }}"></data>
+
+  <div class="wrapper">
+
+    <div class="footer-col-wrapper">
+      <div class="footer-col">
+        <p class="feed-subscribe">
+          <a href="{{ 'feed.xml' | relative_url }}">
+            <svg class="svg-icon orange">
+              <use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
+            </svg><span>Subscribe</span>
+          </a>
+        </p>
+      {%- if site.author %}
+        <ul class="contact-list">
+          {% if site.author.name -%}
+            <li class="p-name">{{ site.author.name | escape }}</li>
+          {% endif -%}
+          {% if site.author.email -%}
+            <li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
+          {%- endif %}
+        </ul>
+      {%- endif %}
+      </div>
+      <div class="footer-col">
+        <p>{{ site.description | escape }}</p>
+      </div>
+    </div>
+
+    <div class="social-links">
+      {%- include social.html -%}
+    </div>
+
+  </div>
+
+</footer>
diff --git a/about.markdown b/about.markdown
index f7ed180..bfbd3b0 100644
--- a/about.markdown
+++ b/about.markdown
@@ -46,7 +46,7 @@ This means you are free to share the posts and modify them, provided that you at
 
 # Acknowledgement
 
-This blog is built with [jekyll] and its [minima] theme.
+This blog is built with [jekyll] and its [minima] theme. I used [openring] to generate others' blog posts from RSS feed.
 
 [fosstodon]: https://fosstodon.org/@huy_ngo
 [matrix]: https://matrix.to/#/@xarvos:matrix.org
@@ -59,3 +59,4 @@ This blog is built with [jekyll] and its [minima] theme.
 [YAltaCV]: https://github.com/Huy-Ngo/YAltaCV
 [discord-meme-bot]: https://github.com/Huy-Ngo/discord-meme-bot
 [wikt-cli]: https://git.sr.ht/~huyngo/wikt-cli
+[openring]: https://git.sr.ht/~sircmpwn/openring
diff --git a/assets/css/webring.scss b/assets/css/webring.scss
new file mode 100644
index 0000000..d36883f
--- /dev/null
+++ b/assets/css/webring.scss
@@ -0,0 +1,21 @@
+---
+---
+
+.webring {
+  margin-bottom: 1rem;
+  .attribution {
+    float: right;
+    font-size: .8rem;
+    line-height: 3;
+  }
+
+  .footer-col.article {
+    padding: 0.5rem;
+
+    margin: 0 0.5rem;
+    border: 0.01rem solid #333;
+    @media(max-width: 640px) {
+      margin: 0.5rem 0;
+    }
+  }
+}
diff --git a/create-webring.sh b/create-webring.sh
new file mode 100755
index 0000000..9bd5d3b
--- /dev/null
+++ b/create-webring.sh
@@ -0,0 +1,7 @@
+# Create webring
+openring \
+  -s https://drewdevault.com/feed.xml \
+  -s https://stallman.org/rss/rss.xml \
+  -s https://news.opensuse.org/feed/ \
+  < webring.template \
+  > _includes/custom-webring.html
diff --git a/webring.template b/webring.template
new file mode 100644
index 0000000..d107318
--- /dev/null
+++ b/webring.template
@@ -0,0 +1,25 @@
+<div class="wrapper">
+  <section class="webring">
+    <h2>
+      Articles from blogs I read
+      <small class="attribution">
+        Generated by
+        <a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
+      </small>
+    </h2>
+    <section class="footer-col-wrapper">
+      {{range .Articles}}
+      <div class="footer-col article">
+        <h4 class="title">
+          <a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a>
+        </h4>
+        <p class="summary">{{.Summary}}</p>
+        <small class="source">
+          via <a href="{{.SourceLink}}">{{.SourceTitle}}</a>
+        </small>
+        <small class="date">{{.Date | date}}</small>
+      </div>
+      {{end}}
+    </section>
+  </section>
+</div>