Browse Source

Initial Commit.

David Peach 1 week ago
commit
100b7a3ec6
40 changed files with 496 additions and 0 deletions
  1. 2
    0
      .gitignore
  2. 95
    0
      LICENSE
  3. 3
    0
      README.md
  4. 6
    0
      archetypes/default.md
  5. 12
    0
      config.toml
  6. 83
    0
      content/2018/12/04/decentralized-alternatives/index.md
  7. 33
    0
      layouts/_default/rss.xml
  8. 16
    0
      layouts/_default/single.html
  9. 52
    0
      layouts/index.html
  10. 10
    0
      layouts/partials/footer.html
  11. 14
    0
      layouts/partials/head.html
  12. 12
    0
      layouts/partials/header.html
  13. 1
    0
      layouts/shortcodes/lastmodified.html
  14. 36
    0
      live
  15. 14
    0
      local
  16. 19
    0
      new
  17. 0
    0
      static/.gitkeep
  18. 45
    0
      static/css/main.css
  19. BIN
      static/fonts/metropolis/Metropolis-Black.otf
  20. BIN
      static/fonts/metropolis/Metropolis-BlackItalic.otf
  21. BIN
      static/fonts/metropolis/Metropolis-Bold.otf
  22. BIN
      static/fonts/metropolis/Metropolis-BoldItalic.otf
  23. BIN
      static/fonts/metropolis/Metropolis-ExtraBold.otf
  24. BIN
      static/fonts/metropolis/Metropolis-ExtraBoldItalic.otf
  25. BIN
      static/fonts/metropolis/Metropolis-ExtraLight.otf
  26. BIN
      static/fonts/metropolis/Metropolis-ExtraLightItalic.otf
  27. BIN
      static/fonts/metropolis/Metropolis-Light.otf
  28. BIN
      static/fonts/metropolis/Metropolis-LightItalic.otf
  29. BIN
      static/fonts/metropolis/Metropolis-Medium.otf
  30. BIN
      static/fonts/metropolis/Metropolis-MediumItalic.otf
  31. BIN
      static/fonts/metropolis/Metropolis-Regular.otf
  32. BIN
      static/fonts/metropolis/Metropolis-RegularItalic.otf
  33. BIN
      static/fonts/metropolis/Metropolis-SemiBold.otf
  34. BIN
      static/fonts/metropolis/Metropolis-SemiBoldItalic.otf
  35. BIN
      static/fonts/metropolis/Metropolis-Thin.otf
  36. BIN
      static/fonts/metropolis/Metropolis-ThinItalic.otf
  37. 43
    0
      static/fonts/metropolis/SIL Open Font License.txt
  38. BIN
      static/img/take-your-heart.jpg
  39. BIN
      static/img/take-your-heart.png
  40. BIN
      static/img/under-construction.gif

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+.DS_Store
2
+*.*~

+ 95
- 0
LICENSE View File

@@ -0,0 +1,95 @@
1
+Creative Commons Attribution-ShareAlike 4.0 International Public License
2
+
3
+By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
4
+
5
+Section 1 – Definitions.
6
+
7
+Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
8
+Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
9
+BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
10
+Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
11
+Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
12
+Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
13
+License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
14
+Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
15
+Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
16
+Licensor means the individual(s) or entity(ies) granting rights under this Public License.
17
+Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
18
+Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
19
+You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
20
+Section 2 – Scope.
21
+
22
+License grant.
23
+Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
24
+reproduce and Share the Licensed Material, in whole or in part; and
25
+produce, reproduce, and Share Adapted Material.
26
+Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
27
+Term. The term of this Public License is specified in Section 6(a).
28
+Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
29
+Downstream recipients.
30
+Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
31
+Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
32
+No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
33
+No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
34
+Other rights.
35
+
36
+Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
37
+Patent and trademark rights are not licensed under this Public License.
38
+To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
39
+Section 3 – License Conditions.
40
+
41
+Your exercise of the Licensed Rights is expressly made subject to the following conditions.
42
+
43
+Attribution.
44
+
45
+If You Share the Licensed Material (including in modified form), You must:
46
+
47
+retain the following if it is supplied by the Licensor with the Licensed Material:
48
+identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
49
+a copyright notice;
50
+a notice that refers to this Public License;
51
+a notice that refers to the disclaimer of warranties;
52
+a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
53
+indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
54
+indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
55
+You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
56
+If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
57
+ShareAlike.
58
+In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
59
+
60
+The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
61
+You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
62
+You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
63
+Section 4 – Sui Generis Database Rights.
64
+
65
+Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
66
+
67
+for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
68
+if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
69
+You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
70
+For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
71
+Section 5 – Disclaimer of Warranties and Limitation of Liability.
72
+
73
+Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
74
+To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
75
+The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
76
+Section 6 – Term and Termination.
77
+
78
+This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
79
+Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
80
+
81
+automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
82
+upon express reinstatement by the Licensor.
83
+For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
84
+For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
85
+Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
86
+Section 7 – Other Terms and Conditions.
87
+
88
+The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
89
+Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
90
+Section 8 – Interpretation.
91
+
92
+For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
93
+To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
94
+No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
95
+Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.

+ 3
- 0
README.md View File

@@ -0,0 +1,3 @@
1
+# David Peach's website
2
+
3
+Cloned from Aral Balkan's personal site and reverse engineered, as I couldn't get Hugo to generate my posts

+ 6
- 0
archetypes/default.md View File

@@ -0,0 +1,6 @@
1
+---
2
+title: "{{ replace .Name "-" " " | title }}"
3
+date: {{ .Date }}
4
+draft: true
5
+---
6
+

+ 12
- 0
config.toml View File

@@ -0,0 +1,12 @@
1
+baseURL = "https://davidpeach.co.uk/"
2
+languageCode = "en-us"
3
+title = "David Peach"
4
+publishDir = "../live"
5
+pygmentsUseClasses = true
6
+
7
+copyright = "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License"
8
+"rssLimit" = 20
9
+
10
+[author]
11
+  name = "David Peach"
12
+  email = "mail@davidpeach.co.uk"

+ 83
- 0
content/2018/12/04/decentralized-alternatives/index.md View File

@@ -0,0 +1,83 @@
1
+---
2
+title: Decentralized Alternatives
3
+date: 2018-12-04T21:53:55Z
4
+draft: true
5
+---
6
+
7
+## Mastodon
8
+
9
+[Visit Mastodon](https://joinmastodon.org/)
10
+
11
+![Mastodon](/assets/img/2018/12/mastodon.jpg)
12
+
13
+### What is Mastodon? 
14
+
15
+Mastodon is a decentralized social network, with every person being able to host their very own instance <sup id="fnref:1"><a href="#fn:1">1</a></sup> of it. This means that each and every person who is using Mastodon can be in full control over their own section of it.
16
+
17
+This means that they can post what they wish, decide what they deem to be decent, and retain full ownership over their content. And despite the fact that each instance is separate, every one of them can talk to all others, with a number of standards-complient protocols including "ActivityPub".
18
+
19
+You even have the option of hosting your own mastodon and letting others join you on your instance. This is great if you wanted to set up a social network around a specific community. And those members still have the option to follow people from over the entire mastodon network.
20
+
21
+### As opposed to
22
+
23
+In comparison, Twitter is a centralized network, with every person going through the single entity "Twitter.com". Twitter inc. have full control over their service and can essentially do what they wish within that service. They can remove content or use that content for their own financial gains.
24
+
25
+If you are looking to take control of your micro-blogging, give [mastodon](https://joinmastodon.org) a try.
26
+
27
+### Test the waters
28
+
29
+If you like the idea of mastodon, but don't know how to start your own, you could head over to [mastodon.social](https://mastodon.social), which is currently open for new registrations. This will let you have a look at it 
30
+
31
+_Alternative to: Twitter_.
32
+
33
+[Visit Mastodon](https://joinmastodon.org)
34
+
35
+## Peertube
36
+
37
+[Visit Peertube](https://joinpeertube.org)
38
+
39
+![Peertube](/assets/img/2018/12/peertube.jpg)
40
+
41
+### What is Peertube?
42
+
43
+Peertube is to YouTube what Mastodon is to Twitter. It is for video hosting and sharing, except is decentralized by design. Each instance owner has full control over the content as well as being able to populate it by following other peertube instances too. So you essentially build up a curated video sharing website from other content creators, but only ones you deem fit for your goals.
44
+
45
+As with Mastodon, you can either host your own instance, or join one of the open registration instances already out there. [peertube.xyz](https://peertube.xyz) is quite a popular one.
46
+
47
+### As opposed to
48
+
49
+YouTube is without a doubt the world's most popular video website. And as with all other Google products / services, everything you do and watch is tracked and used to build up their ever-expanding profile of you.
50
+
51
+To tell you the truth, I don't think I'll be ditching it too soon, although I will be looking to use it without an account and through VPN. I believe that moving towards decentralized places, where people have complete control, is the right way to go.
52
+
53
+Alternative to: YouTube; Vimeo.
54
+
55
+[Visit Peertube](https://joinpeertube.org)
56
+
57
+## Nextcloud
58
+
59
+[Visit Nextcloud](https://nextcloud.com)
60
+
61
+![Nextcloud](/assets/img/2018/12/nextcloud.jpg)
62
+
63
+### What is Nextcloud?
64
+
65
+Nextcloud is your very own cloud storage and syncing service. Self-hosted and under your complete control, Nextcloud has come on strength to strength over the past couple of years. It allows you  the convenience that places like Google Drive, Microsoft One Drive and Dropbox do, except you are the sole owner and controller. You retain complete private ownership over your data.
66
+
67
+You can host text files, videos, music - you name it; Nextcloud can store it. But not only that, it also has a multitude of apps that can be easily installed from within your dashboard that can provide you with even more functionality. Calendars; todo list managers; password managers; and so much more.
68
+
69
+### As opposed to
70
+
71
+Any free service, including free file storage, will always come with caveats. In the case of the popular cloud services, they get to scan you documents and learn as much about you as they can. You are essentially put your private information into someone else's computer, which lends itself to being abused and even shared to third parties.
72
+
73
+Alternative to: Google Drive; Microsoft One Drive; Dropbox.
74
+
75
+[Visit Nextcloud](https://nextcloud.com)
76
+
77
+
78
+<div class="footnotes">
79
+    <p>Footnotes</p>
80
+    <ol>
81
+        <li id="fn:1">An instance is a single installation of a piece of software. <a href="#fnref:1"><sup>[return]</sup></a></li>
82
+    </ol>
83
+</div>

+ 33
- 0
layouts/_default/rss.xml View File

@@ -0,0 +1,33 @@
1
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
2
+  <channel>
3
+    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
4
+    <link>{{ .Permalink }}</link>
5
+    <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
6
+    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
7
+    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
8
+    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
9
+    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
10
+    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
11
+    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
12
+    <image>
13
+      <url>{{ "/apple-touch-icon-144x144.png" | absURL }}</url>
14
+      <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
15
+      <link>{{ .Permalink }}</link>
16
+      <width>144</width>
17
+      <height>144</height>
18
+    </image>
19
+    {{ with .OutputFormats.Get "RSS" }}
20
+        {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
21
+    {{ end }}
22
+    {{ range .Data.Pages }}
23
+    <item>
24
+      <title>{{ .Title }}</title>
25
+      <link>{{ .Permalink }}</link>
26
+      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
27
+      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
28
+      <guid>{{ .Permalink }}</guid>
29
+      <description>{{ replaceRE "img src=\"(.*?)\"" (printf "%s%s%s" "img src=\"" .Permalink "$1\"") .Content | html }}</description>
30
+    </item>
31
+    {{ end }}
32
+  </channel>
33
+</rss>

+ 16
- 0
layouts/_default/single.html View File

@@ -0,0 +1,16 @@
1
+<!doctype html>
2
+<html>
3
+  <head>
4
+    {{ partial "head.html" . }}
5
+  </head>
6
+  <body>
7
+    {{ partial "header.html" . }}
8
+    <nav><a href='/'>Home</a></nav>
9
+    <main>
10
+      <h1>{{ .Page.Title }}</h1>
11
+      <time class='single' datetime="{{ .Page.Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Page.Date.Format "02 Jan 2006" }}</time>
12
+      {{ .Content }}
13
+      {{ partial "footer.html" . }}
14
+    </main>
15
+  </body>
16
+</html>

+ 52
- 0
layouts/index.html View File

@@ -0,0 +1,52 @@
1
+<!doctype html>
2
+<html>
3
+<head>
4
+  {{ partial "head.html" . }}
5
+</head>
6
+<body>
7
+<meta charset="utf-8">
8
+<meta name='viewport' content='width=device-width, initial-scale=1'>
9
+<title>David Peach | Raiding Tombs since 1996</title>
10
+<link rel="stylesheet" href="/css/main.css">
11
+
12
+<!-- RSS feed -->
13
+<link rel="alternate" type="application/rss+xml" href="https://davidpeach.co.uk/index.xml" />
14
+
15
+
16
+{{ partial "header.html" . }}
17
+
18
+
19
+<article class="b-article">
20
+    <h2>New site is coming... slowly.</h2>
21
+    <img src="/img/under-construction.gif" alt="animated stick-person digging" title="under construction">
22
+    <p>I am rebuilding a simple static website from the ground up using the Hugo static site generator. I will be using this website as a playground as well as documenting my processes and learning.</p>
23
+    <p>You can still access all of my old stuff <a href="https://2019.davidpeach.co.uk">here</a>. Using the excellent <a href="https://4042302.org/">404 to 302 technique</a>.</p>
24
+</article>
25
+
26
+<!-- Group by year. -->
27
+    {{ range .Data.Pages.GroupByDate "2006" }}
28
+    <h2>{{ .Key }}</h2>
29
+
30
+      <!-- Group by month. -->
31
+      {{ range .Pages.GroupByDate "January" }}
32
+      <h3>{{ .Key }}</h3>
33
+
34
+        <!-- Orders content according to the "date" field in front matter. -->
35
+        {{ range .Pages.GroupByDate "02" }}
36
+        <h4 class='postdate date'>{{ .Key }}</h4>
37
+        <ul> 
38
+          {{ range $index, $post := .Pages }}
39
+            <li>
40
+              <time datetime="{{ $post.Date.Format "2006-01-02T15:04:05Z0700" }}">
41
+                <span class='postdate day item-{{ $index }}'>{{ $post.Date.Format "Mon" }}</span>
42
+              </time>
43
+              <span class='postdate'>{{ $post.Date.Format "15:04" }}</span>
44
+              <a href="{{ .RelPermalink }}">{{ $post.Title }}</a>
45
+            </li>
46
+          {{ end }}
47
+        </ul>
48
+      {{ end }}
49
+    {{ end }}
50
+  {{ end }}
51
+</body>
52
+</html>

+ 10
- 0
layouts/partials/footer.html View File

@@ -0,0 +1,10 @@
1
+<footer>
2
+  <section id="about-the-author">
3
+    <div>
4
+      <h3>About the author</h3>
5
+      <p class="summary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab, voluptatum enim. Molestiae quaerat quo a ipsam ad quae, ducimus cum velit minus suscipit quasi fugit consequuntur repudiandae! Quas, voluptate, eveniet?</p>
6
+    </div>
7
+  </section>
8
+
9
+  <p>Copyright © 2019 David Peach. <a href='https://labs.davidpeach.co.uk/david/website'>View source.</a> License: <a href='https://creativecommons.org/licenses/by-sa/4.0/'>Creative Commons Attribution-ShareAlike.</a></p>
10
+</footer>

+ 14
- 0
layouts/partials/head.html View File

@@ -0,0 +1,14 @@
1
+{{/* Common elements for the top of the head tag on all pages. */}}
2
+<meta charset='utf-8'>
3
+<meta name='viewport' content='width=device-width, initial-scale=1'>
4
+
5
+<title>{{ .Page.Title }}{{ if ne .IsHome true }} – {{ .Site.Title }}{{ end }}</title>
6
+
7
+<!-- Style sheets -->
8
+<link rel='stylesheet' href='/css/main.css'>
9
+
10
+<!-- RSS feed -->
11
+<link rel="alternate" type="application/rss+xml" href="https://davidpeach.co.uk/index.xml" />
12
+
13
+<!-- Open graph -->
14
+{{ template "_internal/opengraph.html" . }}

+ 12
- 0
layouts/partials/header.html View File

@@ -0,0 +1,12 @@
1
+{{/* Included at the top of the body of all pages. */}}
2
+<header class="b-site-header">
3
+    <h1 class="b-site-header__title">David Peach</h1>
4
+    <p class="b-site-header__tagline">Raiding tombs since 1996</p>
5
+    <img src="/img/take-your-heart.jpg" alt="A red and black cartoon hat with a white flaming eye mask." class="b-site-header__image">
6
+</header>
7
+
8
+<address>
9
+    <p style="font-weight: bold;">All old posts: <a href="https://2019.davidpeach.co.uk">https://2019.davidpeach.co.uk</a></p>
10
+    <p>Mastodon: <a href="https://mastodon.davidpeach.co.uk/@david">https://mastodon.davidpeach.co.uk/@david</a></p>
11
+    <p>Email: <a href="mailto:mail@davidpeach.co.uk">mail@davidpeach.co.uk</a></p>
12
+</address>

+ 1
- 0
layouts/shortcodes/lastmodified.html View File

@@ -0,0 +1 @@
1
+<p><strong>Last modified:</strong> {{ $.Page.Lastmod.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</p>

+ 36
- 0
live View File

@@ -0,0 +1,36 @@
1
+#!/bin/bash
2
+
3
+# Runs command in requested directory in the background
4
+# and restores the working directory at the end.
5
+# Usage: runInBackground <directory> "<command>"
6
+runInBackground(){
7
+	pushd $1 >/dev/null
8
+	eval $2 &
9
+	popd >/dev/null
10
+}
11
+
12
+# With thanks to Job Vranish for his awesome tutorial
13
+# on starting/stopping background processes in Bash:
14
+# https://spin.atomicobject.com/2017/08/24/start-stop-bash-background-process/
15
+trap "exit" INT TERM ERR
16
+trap "kill 0" EXIT
17
+
18
+# Start the rsync deployment watcher
19
+runInBackground ../sync "npm run sync"
20
+
21
+# Start Hugo server.
22
+#
23
+# The baseURL and appendPort flags are set to overwrite the default behaviour
24
+# of Hugo when run with the server option which is to write absolute URLs
25
+# as localhost:<port> regardless of the setting of baseURL in the config.toml
26
+# file. Since we do not have a separate build/deploy phase to the live server,
27
+# we want the site as it would exist on the server to exist on the client.
28
+#
29
+# Note: if you do not want a post live-synced, mark it as draft: true in the
30
+# ===== front matter.
31
+#
32
+hugo server --renderToDisk --baseURL=https://davidpeach.co.uk --appendPort=false
33
+
34
+# Don’t exit. Shutting off this process should also kill
35
+# the two other background processes we started
36
+wait

+ 14
- 0
local View File

@@ -0,0 +1,14 @@
1
+#!/bin/bash
2
+
3
+# Runs just Hugo server for local authoring
4
+# (changes will not be deployed or live streamed over the
5
+# peer-to-peer web. For that, use the ./live script.)
6
+
7
+# Start Hugo server.
8
+#
9
+# The baseURL and appendPort flags are set to overwrite the default behaviour
10
+# of Hugo when run with the server option which is to write absolute URLs
11
+# as localhost:<port> regardless of the setting of baseURL in the config.toml
12
+# file. Since we do not have a separate build/deploy phase to the live server,
13
+# we want the site as it would exist on the server to exist on the client.
14
+hugo server --buildDrafts --renderToDisk --baseURL=https://davidpeach.co.uk --appendPort=false

+ 19
- 0
new View File

@@ -0,0 +1,19 @@
1
+#!/bin/bash
2
+
3
+# Uses Hugo to create a new post based on the current date and the provided title
4
+# e.g., new my-awesome-blog-post will create content/YYYY/MM/DD/my-awesome-blog-post/_index.md
5
+
6
+# Require one argument
7
+if [ $# -eq 0 ]
8
+  then
9
+    echo "Usage: new <title-of-post>"
10
+    exit
11
+fi
12
+
13
+datePrefix=$(date +'%Y/%m/%d/')
14
+postTitle=$1
15
+pathSuffix="/index.md"
16
+
17
+postPath="$datePrefix$postTitle$pathSuffix"
18
+
19
+hugo new $postPath

+ 0
- 0
static/.gitkeep View File


+ 45
- 0
static/css/main.css View File

@@ -0,0 +1,45 @@
1
+@font-face {
2
+  font-family: 'MyWebFont';
3
+  src: url('../fonts/metropolis/Metropolis-Light.otf') format('opentype');
4
+}
5
+
6
+html {
7
+    font-family: 'MyWebFont';
8
+}
9
+
10
+body {
11
+    background-color: #fff;
12
+    padding: 1em;
13
+    margin: 0;
14
+}
15
+
16
+.b-site-header {
17
+    padding: 1em;
18
+    display: grid;
19
+    grid-template-rows: 50px 50px;
20
+    grid-template-columns: 100px 500px;
21
+    grid-template-areas: 'image title'
22
+                         'image tagline';
23
+    grid-column-gap: 1em;
24
+}
25
+.b-site-header__title {
26
+    grid-area: title;
27
+}
28
+.b-site-header__tagline {
29
+    grid-area: tagline;
30
+}
31
+.b-site-header__image {
32
+    max-width: 100%;
33
+    max-height: 100%;
34
+    grid-area: image;
35
+    border-radius: 50%;
36
+}
37
+
38
+.b-article {
39
+    line-height: 1.5;
40
+    font-size: 1.2em;
41
+}
42
+
43
+.b-article p {
44
+    max-width: 45rem;
45
+}

BIN
static/fonts/metropolis/Metropolis-Black.otf View File


BIN
static/fonts/metropolis/Metropolis-BlackItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-Bold.otf View File


BIN
static/fonts/metropolis/Metropolis-BoldItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-ExtraBold.otf View File


BIN
static/fonts/metropolis/Metropolis-ExtraBoldItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-ExtraLight.otf View File


BIN
static/fonts/metropolis/Metropolis-ExtraLightItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-Light.otf View File


BIN
static/fonts/metropolis/Metropolis-LightItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-Medium.otf View File


BIN
static/fonts/metropolis/Metropolis-MediumItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-Regular.otf View File


BIN
static/fonts/metropolis/Metropolis-RegularItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-SemiBold.otf View File


BIN
static/fonts/metropolis/Metropolis-SemiBoldItalic.otf View File


BIN
static/fonts/metropolis/Metropolis-Thin.otf View File


BIN
static/fonts/metropolis/Metropolis-ThinItalic.otf View File


+ 43
- 0
static/fonts/metropolis/SIL Open Font License.txt View File

@@ -0,0 +1,43 @@
1
+Copyright (c) 2015, Chris Simpson, with Reserved Font Name: "Metropolis".
2
+
3
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
5
+
6
+-----------------------------------------------------------
7
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
8
+-----------------------------------------------------------
9
+
10
+PREAMBLE
11
+The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
12
+
13
+The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
14
+
15
+DEFINITIONS
16
+"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
17
+
18
+"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
19
+
20
+"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
21
+
22
+"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
23
+
24
+"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
25
+
26
+PERMISSION & CONDITIONS
27
+Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
28
+
29
+1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
30
+
31
+2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
32
+
33
+3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
34
+
35
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
36
+
37
+5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
38
+
39
+TERMINATION
40
+This license becomes null and void if any of the above conditions are not met.
41
+
42
+DISCLAIMER
43
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
static/img/take-your-heart.jpg View File


BIN
static/img/take-your-heart.png View File


BIN
static/img/under-construction.gif View File


Loading…
Cancel
Save