diff --git a/.htmlvalidate.json b/.htmlvalidate.json new file mode 100644 index 0000000..e1f5a70 --- /dev/null +++ b/.htmlvalidate.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "html-validate:prettier", + "html-validate:recommended" + ] +} diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/.prettierignore b/.prettierignore index 60223c1..c2658d7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1 @@ node_modules/ -layouts/ -* \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 46017e6..51dc486 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,8 +5,10 @@ "files": "*.html", "options": { "printWidth": 140, - "singleAttributePerLine": true + "singleAttributePerLine": true, + "parser": "go-template" } } - ] + ], + "plugins": ["prettier-plugin-go-template"] } diff --git a/assets/js/roles-chart.gojs b/assets/js/roles-chart.gojs index 7ed02b2..b3d69ef 100644 --- a/assets/js/roles-chart.gojs +++ b/assets/js/roles-chart.gojs @@ -64,7 +64,7 @@ function drawChart() { {{- if $add_redacted -}} {{- $.Scratch.Set "parents" ( $.Scratch.Get "parents" | append "███████████████" ) -}} {{- else -}} - {{- $.Scratch.Set "parents" ( $.Scratch.Get "parents" | append ( ( partial "cv/organisation/get_top_level_ancestor.html.tmpl" . ) | plainify ) ) -}} + {{- $.Scratch.Set "parents" ( $.Scratch.Get "parents" | append ( ( partial "cv/organisation/get_top_level_ancestor.html" . ) | plainify ) ) -}} {{- end -}} {{- else -}} {{ erroridf "missing-organisation" "Could not find organisation %q (%q)" . $.File.Path }} diff --git a/config.toml b/config.toml deleted file mode 100644 index c0bc7f9..0000000 --- a/config.toml +++ /dev/null @@ -1,5 +0,0 @@ -[module] - [module.hugoVersion] - extended = true - min = "0.140.0" - max = "0.140.2" diff --git a/config/_default/config.yaml b/config/_default/config.yaml new file mode 100644 index 0000000..2719d80 --- /dev/null +++ b/config/_default/config.yaml @@ -0,0 +1,69 @@ +module: + hugoVersion: + extended: true + min: "0.140.0" + max: "0.140.2" + +baseURL: 'https://example.com/' +languageCode: en-gb +title: Omphaloskepsis 2 + +capitalizeListTitles: false +copyright: CC0 +enableRobotsTXT: true + +params: + author: + name: John Smith + email: admin@example.com + description: + reportIssueURL: '/Rumperuu/Omphaloskepsis-2/issues' + codeURL: 'https://code.bengoldsworthy.net' + feedIcon: /images/feed-icon.svg + keyFile: + mainSections: + - blog + - portfolio + - cv + pre_nominals: + post_nominals: + redact: skip + +permalinks: + cv: /:sections/:slug + portfolio: /:sections/:slug + blog: /:sections/:slug + organisations: /cv/organisation/:slug + +taxonomies: + category: categories + tag: tags + series: series + organisation: organisations + location: locations + soc: socs +# colleague: colleagues + skill: skills + area: areas + +markup: + tableOfContents: + endLevel: 3 + goldmark: + renderer: + unsafe: true + extensions: + passthrough: + delimiters: + block: + - - \[ + - \] + - - $$ + - $$ + inline: + - - \( + - \) + enable: true + +ignoreErrors: + - "missing-cite" diff --git a/config/development/config.yaml b/config/development/config.yaml new file mode 100644 index 0000000..e198ade --- /dev/null +++ b/config/development/config.yaml @@ -0,0 +1,11 @@ +baseURL: 'localhost:1313' +title: "Omphaloskepsis 2 [DEV]" + +buildDrafts: true +buildFuture: true + +params: + redact: black + +taxonomies: + colleague: colleagues diff --git a/config/production/config.yaml b/config/production/config.yaml new file mode 100644 index 0000000..d5bed1f --- /dev/null +++ b/config/production/config.yaml @@ -0,0 +1 @@ +publishDir: public diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..f9f8721 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,14 @@ +--- +title: Blog +mainType: https://schema.org/Blog +itemsType: https://schema.org/BlogPosting" itemprop="blogPost +cascade: + images: + - images + audio: + - audio + videos: + - videos + _build: + publishResources: false +--- diff --git a/content/blog/posts/_index.md b/content/blog/posts/_index.md new file mode 100644 index 0000000..fe9d11e --- /dev/null +++ b/content/blog/posts/_index.md @@ -0,0 +1,4 @@ +--- +title: Blog Posts +ignore: true +--- diff --git a/content/cv/_index.md b/content/cv/_index.md new file mode 100644 index 0000000..473f39c --- /dev/null +++ b/content/cv/_index.md @@ -0,0 +1,8 @@ +--- +title: CV +type: cv +--- + +This section is for things you have done in your life, e.g. jobs, roles, qualifications. + +Click on the sections below to view more details about each experience, or filter the timeline below by using the buttons just above it. diff --git a/content/cv/organisations/_index.md b/content/cv/organisations/_index.md new file mode 100644 index 0000000..69b1b5d --- /dev/null +++ b/content/cv/organisations/_index.md @@ -0,0 +1,4 @@ +--- +title: Organisations +type: cv/organisations +--- diff --git a/content/cv/roles/_index.md b/content/cv/roles/_index.md new file mode 100644 index 0000000..1f1b28f --- /dev/null +++ b/content/cv/roles/_index.md @@ -0,0 +1,4 @@ +--- +title: Roles +type: cv/roles +--- diff --git a/content/locations/_index.md b/content/locations/_index.md new file mode 100644 index 0000000..b800e3a --- /dev/null +++ b/content/locations/_index.md @@ -0,0 +1,7 @@ +--- +title: Locations +date: 2024-02-13 +layout: locations +--- + +Test diff --git a/content/pages/privacy-policy/index.md b/content/pages/privacy-policy/index.md new file mode 100644 index 0000000..8fa84de --- /dev/null +++ b/content/pages/privacy-policy/index.md @@ -0,0 +1,5 @@ +--- +title: Privacy Policy +--- + +TODO - write privacy policy diff --git a/content/portfolio/_index.md b/content/portfolio/_index.md new file mode 100644 index 0000000..2ae4c01 --- /dev/null +++ b/content/portfolio/_index.md @@ -0,0 +1,6 @@ +--- +title: Portfolio +type: portfolio +--- + +This section is for things you have produced, whatever their formats and media. diff --git a/content/styleguide/comments.md b/content/styleguide/comments.md new file mode 100644 index 0000000..6080893 --- /dev/null +++ b/content/styleguide/comments.md @@ -0,0 +1,8 @@ +  +{{% comment + author="Comment author" + source="Comment source" + publishDate="2022-07-05T13:00:00+05:00" +%}} +A comment shortcode. +{{% /comment %}} diff --git a/content/styleguide/images/lena.png b/content/styleguide/images/lena.png new file mode 100644 index 0000000..59ef68a Binary files /dev/null and b/content/styleguide/images/lena.png differ diff --git a/content/styleguide/index.md b/content/styleguide/index.md new file mode 100644 index 0000000..58dfaf3 --- /dev/null +++ b/content/styleguide/index.md @@ -0,0 +1,294 @@ +--- +title: Styleguide + +# Resources +featured_image: lena +resources: + - name: lena + src: images/lena.* + params: + alt: Woman smiling + attr: +--- + +## HTML + +Test paragraph test paragraph test paragraph test paragraph test paragraph test +paragraph test paragraph test paragraph. + +Emphasis text. Alternate voice text. Stress emphasis text. Strong text. Annotated text Strikethrough text. + +Superscript and subscript text. Nested superscript text. Nested subscript text. + +Small text + +Highlighted text. + +Deleted inserted text. + +An inline quotation. + +Machine-readable data + + + +Code + +Ctrl + Alt + Del + +Ctrl + Alt + Del + +a or b + +Sample program output. + +
+  Pre       formatt
+      ed    te
+  xt.
+
+ +A definition of a term. + +Decription list: + +
+
Term
Definition of term
+
+ +Address: + +
+ 123 Fake Street
+ Fakesville
+ USA +
+ + + +Math: + +Block: + + + 1 + + 2 + + + + +Inline e = MC2 math + +Table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table caption
HeadingHeadingHeading
BodyBodyBody
BodyBodyBody
FooterFooterFooter
+ + + +
+ Summary + Details details details details details details details. +
+ +--- + +## Markdown + +# Heading 1 + +## Heading 2 + +### Heading 3 + +#### Heading 4 + +##### Heading 5 + +###### Heading 6 + +Normal text. **Bold text.** _Italics text._ `Monospace text.` [Internal link](/). + +[External link](https://wikipedia.org). [Mailto link](mailto:foo@bar.baz). [Phone link](tel:0000000). + +Lists: + +- Unordered list +- Unordered list + - Nested unordered list + - Nested unordered list + - Nested unordered list + - Nested unordered list + - Nested unordered list +- Nested unordered list + +1. Ordered list +1. Ordered list + 1. Nested Ordered list + 1. Nested Ordered list + 1. Nested Ordered list + 1. Nested Ordered list + 1. Nested Ordered list +1. Nested Ordered list + +--- + +> Blockquote blockquote blockquote blockquote blockquote blockquote blockquote. + +--- + +Code block: + +``` +int main() { + +} +``` + +Code block with syntax highlighting: + +```c +int main() { + +} +``` + +--- + +Table: + +| Heading | Heading | Heading | +| ------- | ------- | ------- | +| Body | Body | Body | +| Body | Body | Body | + +--- + +## Shortcodes + +Inline picture: + +{{< picture + src="lena" +>}} + +Linked picture: + +{{< picture + src="lena" + link="/" +>}} + +Figure + +{{< figure + src="lena" +>}} + +Linked figure + +{{< figure + src="lena" + link="/" +>}} + +Figure with caption: + +{{< figure + src="lena" + caption="This is a caption" +>}} + +--- + +An abbreviation shortcode: {{< abbr "eg" >}}. + +{{< blockquote + source="Source" +>}} +A blockquote shortcode. +{{< /blockquote >}} + +{{< blockquote + source="Source" + style="epigram" +>}} +An epigram-style blockquote shortcode. +{{< /blockquote >}} + +{{< blockquote + source="Source" + title="Film title" + schemaType="Movie" + style="epigram" +>}} +A blockquote shortcode. +{{< /blockquote >}} + +{{< blockquote + source="Source" + title="Chapter title" + schemaType="Chapter" + titleSeries="Book title" + schemaTypeSeries="Book" + style="epigram" +>}} +A blockquote shortcode. +{{< /blockquote >}} + +{{< blockquote + source="Source" + title="TV episode title" + schemaType="TVEpisode" + titleSeries="TV series title" + schemaTypeSeries="TVSeries" + numberSeries="S01E01" + style="epigram" +>}} +A blockquote shortcode. +{{< /blockquote >}} + +A {{< cite title="cite" >}} shortcode. + +A {{< q >}}short quotation{{< /q >}} shortcode. diff --git a/data/abbreviations.json b/data/abbreviations.json index 2c63c08..eb6f7ef 100644 --- a/data/abbreviations.json +++ b/data/abbreviations.json @@ -1,2 +1,8 @@ { + "eg": { + "lang": "la", + "longTitle": "exemplī grātiā", + "longTitleTrans": "for example", + "shortTitle": "e.g." + } } diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..acf8c5d --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,5 @@ +import eslintConfigPrettier from "eslint-config-prettier"; + +export default [ + eslintConfigPrettier, +]; diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index c1b19b7..0000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import pluginJs from "@eslint/js"; -import globals from "globals"; - -export default [ - {languageOptions: { globals: globals.browser }}, - pluginJs.configs.recommended, -]; diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 00e33e0..5ad5eaf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -11,15 +11,24 @@ - {{- block "title" . -}}{{- .Site.Title }} | {{ .Site.Params.tagline -}}{{- end -}} + + {{- block "title" . -}} + {{- .Site.Title -}} + {{- with .Site.Params.tagline -}} + {{- printf " | %s" . -}} + {{- end -}} + {{- end -}} + - - + + {{- with .Site.Params.keyfile -}} + + {{- end -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e495cc4..7f7c11a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -30,7 +30,7 @@ }).addTo(map); var latLons = []; - {{ $locations := partialCached "util/get_location_leaf_nodes.html.tmpl" $.Site.Data.locations -}} + {{ $locations := partialCached "util/get_location_leaf_nodes.html" $.Site.Data.locations -}} {{- range . -}} {{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}} L.marker([{{ .lat }}, {{ .lon }}]).addTo(map); @@ -85,7 +85,7 @@ {{- end -}} ) {{- end -}} -

+

{{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 62016f4..571cca7 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -30,7 +30,7 @@ }).addTo(map); var latLons = []; - {{ $locations := partialCached "util/get_location_leaf_nodes.html.tmpl" $.Site.Data.locations -}} + {{ $locations := partialCached "util/get_location_leaf_nodes.html" $.Site.Data.locations -}} {{- range . -}} {{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}} L.marker([{{ .lat }}, {{ .lon }}]).addTo(map); @@ -161,7 +161,7 @@ diff --git a/layouts/cv/organisations/section.html b/layouts/cv/organisations/section.html index d9f2cb1..6222d9d 100644 --- a/layouts/cv/organisations/section.html +++ b/layouts/cv/organisations/section.html @@ -28,7 +28,7 @@ {{ define "main-body" }} {{ with .GetPage "cv/organisations" }} - {{ partial "cv/organisations/organisations-table.html.tmpl" . }} + {{ partial "cv/organisations/organisations-table.html" . }} {{ end }} {{ end }} diff --git a/layouts/cv/section.html b/layouts/cv/section.html index 7788832..e863e8e 100644 --- a/layouts/cv/section.html +++ b/layouts/cv/section.html @@ -152,7 +152,7 @@ {{ end }} - {{- partialCached "cv/timeline-legend.html.tmpl" . -}} + {{- partialCached "cv/timeline-legend.html" . -}} {{- else -}}