Add Amazon shopping recommendations for common tags

This commit is contained in:
Ariejan de Vroom 2017-11-15 14:32:24 +01:00
parent 309208237a
commit 40f21a7718
Signed by: ariejan
GPG Key ID: AD739154F713697B
6 changed files with 56 additions and 18 deletions

View File

@ -39,7 +39,7 @@ git log --pretty=oneline -3
In GitX it would look like this:
<img src="https://ariejannet.s3.amazonaws.com/wp-content/uploads/2009/10/imdb_fix_empty_poster_01.jpg" alt="imdb_fix_empty_poster_01" title="imdb_fix_empty_poster_01" width="397" height="53" class="aligncenter size-full wp-image-575" />
![gitx view](/img/imdb_fix_empty_poster_01.jpg)
Okay, now it's time to go and make a patch! All we really want are the two latest commits, stuff them in a file and send them to someone to apply them. But, since we created a separate branch, we don't have to worry about commits at all!
@ -81,7 +81,7 @@ Okay, patches were applied cleanly and your master branch has been updated. Of c
In you git log, you'll find that the commit messages contain a "Signed-off-by" tag. This tag will be read by Github and others to provide useful info about how the commit ended up in the code.
<img src="https://ariejannet.s3.amazonaws.com/wp-content/uploads/2009/10/imdb_signed_off.jpg" alt="imdb_signed_off" title="imdb_signed_off" width="395" height="203" class="aligncenter size-full wp-image-578" />
![Signed off commit](/img/imdb_signed_off.jpg)
That's all folks!

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -19,7 +19,7 @@
<ul>
{{ range .Params.tags }}
<div class="middot"></div>
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> </li>
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ lower . }}</a> </li>
{{ end }}
</ul>
</div>
@ -39,7 +39,9 @@
</div>
<div class="markdown" id="post-gallery-wrapper">
{{ partial "content" . }}
<br>
{{ if .Site.Params.book_recommendations }}
{{ partial "recommendations.html" . }}
{{ end }}
</div>
{{ if .Site.Params.share }}
<div class="share">
@ -49,9 +51,6 @@
<a href="" class="ssk ssk-linkedin"></a>
</div>
{{ end }}
{{ if .Site.Params.book_recommendations }}
{{ partial "recommendations.html" . }}
{{ end }}
{{ if .Site.Params.posts_navigation }}
<div class="navigation">
{{ if .PrevInSection }}

View File

@ -19,7 +19,7 @@
<ul>
{{ range .Params.tags }}
<div class="middot"></div>
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> </li>
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ lower . }}</a> </li>
{{ end }}
</ul>
</div>
@ -39,7 +39,9 @@
</div>
<div class="markdown" id="post-gallery-wrapper">
{{ partial "content" . }}
<br>
{{ if .Site.Params.book_recommendations }}
{{ partial "recommendations.html" . }}
{{ end }}
</div>
{{ if .Site.Params.share }}
<div class="share">
@ -49,9 +51,6 @@
<a href="" class="ssk ssk-linkedin"></a>
</div>
{{ end }}
{{ if .Site.Params.book_recommendations }}
{{ partial "recommendations.html" . }}
{{ end }}
{{ if .Site.Params.posts_navigation }}
<div class="navigation">
{{ if .PrevInSection }}

View File

@ -1,6 +1,46 @@
{{ if in .Params.tags "git" }}
<div class="book-recommendations">
<p>
Want to go deeper? <a href="/recommendations">Check my reading
recommendations</a> to learn more about this and other topics.
</p>
<h2>Learn more about git!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=fb127203-1e78-4aec-a921-7a3eb6ca208c"></script>
</div>
{{ else if in .Params.tags "vim" }}
<div class="book-recommendations">
<h2>Learn more about Vim</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=a48acad7-f65c-42fe-b06c-52f6408bebf8"></script>
</div>
{{ else if in .Params.tags "tmux" }}
<div class="book-recommendations">
<h2>Learn more about tmux!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=96165b63-472e-447d-888e-81870d021f53"></script>
</div>
{{ else if or (in .Params.tags "electronics") (in .Params.tags "repair") }}
<div class="book-recommendations">
<h2>Learn more about Electronics!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=28129498-3909-469c-aeab-9616f6cc85b3"></script>
</div>
{{ else if and (in .Params.tags "Linux") (in .Params.tags "debian") }}
<div class="book-recommendations">
<h2>Learn more about Debian Linux!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=e171e4b9-6d1d-4389-ba17-dbbbef1c4bb4"></script>
</div>
{{ else if and (in .Params.tags "linux") (in .Params.tags "ubuntu") }}
<div class="book-recommendations">
<h2>Learn more about Ubuntu Linux!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=ee0780d5-2985-4292-8952-c5ba7209fedc"></script>
</div>
{{ else if in .Params.tags "linux" }}
<div class="book-recommendations">
<h2>Learn more about Linux!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=829b1fed-202e-4061-8ea2-e1cde1bc1a92"></script>
</div>
{{ else if or (in .Params.tags "rails") (in .Params.tags "ruby") }}
<div class="book-recommendations">
<h2>Learn more about Ruby on Rails!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=5e38aa9d-b1d6-4ecb-8ddd-731b73b5df90"></script>
</div>
{{ else if in .Params.tags "bitcoin" }}
<div class="book-recommendations">
<h2>Learn more about Bitcoin!</h2>
<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=fe44a34a-a7c8-4401-9c8d-2c5c1f5b2178"></script>
</div>
{{ end }}