add some opengraph bullshit for previews

master
Ondřej Hruška 5 years ago
parent f876c590f3
commit b40703c546
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 10
      src/main.rs
  2. 1
      web/.gitignore
  3. BIN
      web/data/2019-02-05/2019-02-05 23.48.09 cover.jpg
  4. 8
      web/data/2019-02-05/note.txt
  5. 283
      web/feed.xml
  6. 25
      web/templates/detail.html

@ -225,9 +225,15 @@ fn main() {
// Generate the detail page
{
let win_title = format!("Bread from {}", date);
let detail = detail_tpl
.replace("{head}", &head_tpl.replace("{title}", &format!("Bread from {}", date)).trim())
.replace("{title}", &date)
.replace("{head}", &head_tpl.replace("{title}", &win_title))
.replace("{title}", &win_title)
.replace("{date}", &date_slug)
.replace("{url}", &format!("https://www.ondrovo.com/bread/{}", detail_file))
.replace("{thumb_url}", &format!("https://www.ondrovo.com/bread/thumbs/{}", thumb_fname))
.replace("{heading}", &date)
.replace("{note}", note.trim());
let mut pics = String::new();

1
web/.gitignore vendored

@ -1,2 +1,3 @@
*.html
!templates/*
feed.xml

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

@ -0,0 +1,8 @@
this bread is a bit experimental. I tried to revigorate the starter,
so it grew to quite a big volume over the last few days. That
went into this bread without much 'proving' time, because I didn't
plan it right and it was too late in the night. The final dough
rested maybe 2 hours. The flour ratio is otherwise about my usual 1:1.
The bread looks nice, tastes okay, but is a bit chewy.
It really needs the extra time. Lesson learned, i guess

@ -1,283 +0,0 @@
<rss version="2.0">
<channel>
<title>Piggo&apos;s Bread Gallery</title>
<link>https://www.ondrovo.com/bread</link>
<description>Sourdough feed</description>
<item>
<title>2018/09/19</title>
<link>https://www.ondrovo.com/bread/2018-09-19.html</link>
<description>
<![CDATA[<p>This was my first bread ever.</p>
<p>I didn&#8217;t have a sourdough starter yet, so it used store-bought yeast. It looked okay, tasted mediocre.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-09-19.jpg" alt="dgs - 2 sep 19 cover.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-09-19.html</guid>
<pubDate>Wed, 19 Sep 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/09/26</title>
<link>https://www.ondrovo.com/bread/2018-09-26.html</link>
<description>
<![CDATA[<p>My first sourdough bread. I added coriander seeds to it. Pretty good</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-09-26.jpg" alt="dgs - 3 sep 26.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-09-26.html</guid>
<pubDate>Wed, 26 Sep 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/09/30</title>
<link>https://www.ondrovo.com/bread/2018-09-30.html</link>
<description>
<![CDATA[<p>nice crust, but it had huge holes in it. idk why</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-09-30.jpg" alt="dgs - 7 sep 30 cover.jpg"><p><i>Open the link for full-res photos (4 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-09-30.html</guid>
<pubDate>Sun, 30 Sep 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/10/04</title>
<link>https://www.ondrovo.com/bread/2018-10-04.html</link>
<description>
<![CDATA[<p>Tried cutting the dough blob before baking, like I saw in some tutorial. I think I overdid it a bit</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-10-04.jpg" alt="dgs - 9 oct 4.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-10-04.html</guid>
<pubDate>Thu, 4 Oct 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/10/09</title>
<link>https://www.ondrovo.com/bread/2018-10-09.html</link>
<description>
<![CDATA[<p>a bit flat, but tasty</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-10-09.jpg" alt="dgs - 10 oct 9.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-10-09.html</guid>
<pubDate>Tue, 9 Oct 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/10/15</title>
<link>https://www.ondrovo.com/bread/2018-10-15.html</link>
<description>
<![CDATA[<p>nice crust</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-10-15.jpg" alt="dgs - 12 oct 15.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-10-15.html</guid>
<pubDate>Mon, 15 Oct 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/10/20</title>
<link>https://www.ondrovo.com/bread/2018-10-20.html</link>
<description>
<![CDATA[<p>I made the dough too runny–too much water–so it spilled over the whole baking form. That&#8217;s why it&#8217;s round. I dont remember what it tasted like, probably average</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-10-20.jpg" alt="dgs - 13 oct 20.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-10-20.html</guid>
<pubDate>Sat, 20 Oct 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/10/24</title>
<link>https://www.ondrovo.com/bread/2018-10-24.html</link>
<description>
<![CDATA[<i>There's no note about this bread.</i><img src="https://www.ondrovo.com/bread/thumbs/2018-10-24.jpg" alt="dgs - 14 oct 24.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-10-24.html</guid>
<pubDate>Wed, 24 Oct 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/10/30</title>
<link>https://www.ondrovo.com/bread/2018-10-30.html</link>
<description>
<![CDATA[<p>this came out a bit more &quot;rustic&quot; than usual. the cracked crust looks nice, but it makes slicing difficult</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-10-30.jpg" alt="dgs - 15 oct 30.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-10-30.html</guid>
<pubDate>Tue, 30 Oct 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/11/06</title>
<link>https://www.ondrovo.com/bread/2018-11-06.html</link>
<description>
<![CDATA[<p>Experimenting with chia seeds. Tasted okay, but a lot of the seeds didn&#8217;t stick to the bread. Maybe I should&#8217;ve put them in water for a bit first.. they get all slimy in water, might stick better</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-11-06.jpg" alt="dgs - 17 nov 6.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-11-06.html</guid>
<pubDate>Tue, 6 Nov 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/11/20</title>
<link>https://www.ondrovo.com/bread/2018-11-20.html</link>
<description>
<![CDATA[<p>cracked crust again</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-11-20.jpg" alt="dgs - 18 - nov 20.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-11-20.html</guid>
<pubDate>Tue, 20 Nov 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2018/12/28</title>
<link>https://www.ondrovo.com/bread/2018-12-28.html</link>
<description>
<![CDATA[<p>I didn&#8217;t bake any bread for almost a month and the starter culture went bad. This bread didn&#8217;t rise at all and was super sour.</p>
<p>Was planning to eat it, but it was just disgusting. I threw the whole thing out and refreshed the starter for about a week.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2018-12-28.jpg" alt="pleroma - 2018-12-28.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2018-12-28.html</guid>
<pubDate>Fri, 28 Dec 2018 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/02</title>
<link>https://www.ondrovo.com/bread/2019-01-02.html</link>
<description>
<![CDATA[<p>First bread with the renewed starter culture. Didn&#8217;t rise much, but tasted okay.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-02.jpg" alt="pleroma - 2019-01-02.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-02.html</guid>
<pubDate>Wed, 2 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/06</title>
<link>https://www.ondrovo.com/bread/2019-01-06.html</link>
<description>
<![CDATA[<p>that&#8217;s more like it</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-06.jpg" alt="pleroma - 2019-01-06.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-06.html</guid>
<pubDate>Sun, 6 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/08</title>
<link>https://www.ondrovo.com/bread/2019-01-08.html</link>
<description>
<![CDATA[<p>trying a new recipe - I may have finally found the right ratio of rye vs wheat flour. It&#8217;s quite simple - 1:1. Baked with 200g of each and one spoon of salt. Note the starter is rye only, so it counts into the rye amount.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-08.jpg" alt="pleroma - 2019-01-09 cover.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-08.html</guid>
<pubDate>Tue, 8 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/10</title>
<link>https://www.ondrovo.com/bread/2019-01-10.html</link>
<description>
<![CDATA[<p>Trying to bake a baguette with a recipe I got from Dashie. It tasted okay, but I&#8217;ll stick with bread.</p>
<p>the weird shape is due to limited baking space - I baked it (like all the other breads) in a <a href='http://remoska.cz/'>Remoska</a>.</p>
<p>here&#8217;s the recipe:</p>
<ul>
<li>340ml water ~25°C</li>
<li>2 tablespoon of oil (used sunflower one)</li>
<li>2 coffee spoons of salt</li>
<li>4 coffee spoon of sugar</li>
<li>560gr of T55 type flour</li>
<li>5g of <em>instant</em> yeast (bought in a bunch of small bags)</li>
</ul>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-10.jpg" alt="pleroma - 2019-01-10 a.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-10.html</guid>
<pubDate>Thu, 10 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/11</title>
<link>https://www.ondrovo.com/bread/2019-01-11.html</link>
<description>
<![CDATA[<p>this one was very good</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-11.jpg" alt="pleroma - 2019-01-11 b cover.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-11.html</guid>
<pubDate>Fri, 11 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/14</title>
<link>https://www.ondrovo.com/bread/2019-01-14.html</link>
<description>
<![CDATA[<p>nice texture, not cracked at all. this is because I added some water into the baking form, so it made steam. like you&#8217;re supposed to.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-14.jpg" alt="pleroma - 2019-01-14.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-14.html</guid>
<pubDate>Mon, 14 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/19</title>
<link>https://www.ondrovo.com/bread/2019-01-19.html</link>
<description>
<![CDATA[<p>made the dough too dry, so it couldn&#8217;t rise properly. also didn&#8217;t do the steam thing. all in all a disaster</p>
<p>but it tasted okay regardless</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-19.jpg" alt="pleroma - 2019-01-19 a.jpg"><p><i>Open the link for full-res photos (2 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-19.html</guid>
<pubDate>Sat, 19 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/23</title>
<link>https://www.ondrovo.com/bread/2019-01-23.html</link>
<description>
<![CDATA[<p>This was one of the best breads yet. I didn&#8217;t use any of the wholegrain wheat this time, but the main difference was probably that I made the dough more wet (after the small dry bread fiasco) and gave it more time to rise.</p>
<p>The starter with rye was sitting in its bowl overnight, then I mixed it with wheat, salt and spices in the morning and let it do its work til about 2 PM. The dough was nice and stringy, as you can see in the pictures.</p>
<p>Also the crust came out excellent, not too thick and crunchy.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-23.jpg" alt="2019-01-23 19.42.04 cover.jpg"><p><i>Open the link for full-res photos (3 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-23.html</guid>
<pubDate>Wed, 23 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/28</title>
<link>https://www.ondrovo.com/bread/2019-01-28.html</link>
<description>
<![CDATA[<p>Baked with instructions from <a href='https://www.youtube.com/watch?v=0gCe09eEmWw'>this Robin Food video</a> recommended by Ondiz.</p>
<p>So what&#8217;s different? I didn&#8217;t try using oil as an anti-sticking agent before. Oil really is better than flour. You also have more control over the amount and ratio of flour in the bread this way.</p>
<p>I also don&#8217;t normally score the bread, after the <a href='2018-10-04.html'>last experiment</a> failed so spectacularly. This was still too deep, but it turned out a lot better.</p>
<p>And it tastes pretty damn good!</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-28.jpg" alt="2019-01-28 16.21.27 cover.jpg"><p><i>Open the link for full-res photos (4 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-28.html</guid>
<pubDate>Mon, 28 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/01/31</title>
<link>https://www.ondrovo.com/bread/2019-01-31.html</link>
<description>
<![CDATA[<p>Testing my new rattan basket. It was time for an upgrade ^_^</p>
<p>Shape is ok, but the bread came out tasting a little sour. sourdough duh</p>
<p>But it&#8217;s because of poor planning, I started it too late in the day so it wasn&#8217;t ready by the time I went to bed, and in the morning it was &quot;over-proofed&quot;.</p>
<p>also forgot to score it, oops</p>
<p>Gonna be more careful next time. It&#8217;ll taste better when it cools down, I&#8217;m sure</p>
<p><em>update: it tastes fine after a few hours!</em></p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-01-31.jpg" alt="2019-01-31 10.58.43 cover.jpg"><p><i>Open the link for full-res photos (4 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-01-31.html</guid>
<pubDate>Thu, 31 Jan 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>2019/02/02</title>
<link>https://www.ondrovo.com/bread/2019-02-02.html</link>
<description>
<![CDATA[<p><strong>time flies, huh? there&#8217;s a new bread already!</strong></p>
<p><em>New:</em> The bread gallery is now sorted from the newest bread. Check it out!</p>
<hr><p>Scoring came out great this time.</p>
<img src="https://www.ondrovo.com/bread/thumbs/2019-02-02.jpg" alt="2019-02-02 20.54.28.jpg"><p><i>Open the link for full-res photos (1 total)</i>]]>
</description>
<guid>https://www.ondrovo.com/bread/2019-02-02.html</guid>
<pubDate>Sat, 2 Feb 2019 12:00:00 +0000</pubDate>
</item>
</channel>
</rss>

@ -1,10 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" dir="ltr" itemscope itemtype="http://schema.org/Article">
<head>
{head}
<link rel="canonical" href="{url}">
<meta property="og:type" content="article">
<meta property="og:url" content="{url}">
<meta property="og:image" content="{thumb_url}">
<meta property="og:title" content="{title}">
<meta itemprop="name" content="{title}">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="Piggo's Bread Gallery">
<meta itemprop="datePublished" content="{date}">
<meta itemprop="dateModified" content="{date}">
<meta name="twitter:title" content="{title}">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="{thumb_url}">
<meta itemprop="headline" content="{title}">
<meta itemprop="image" content="{thumb_url}">
</head>
<body>
<h1>{title}</h1>
<h1>{heading}</h1>
<section class="BreadDetail">
<div class="note">

Loading…
Cancel
Save