From 62aa0f1a4492adb4ad3dc13153587d9623b02513 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Mon, 11 Apr 2022 19:05:51 -0400 Subject: [PATCH] Configure website in literate config --- README.org | 103 +++++++++++++++++++++++++++++++++++++++++++++++ docs/config.toml | 16 ++------ 2 files changed, 106 insertions(+), 13 deletions(-) diff --git a/README.org b/README.org index e74d6bb..50d0fad 100644 --- a/README.org +++ b/README.org @@ -2630,4 +2630,107 @@ epkgs.doom-modeline (doom-modeline-set-modeline 'dotfiles/modeline 'default) #+END_SRC +* Website Configuration + +My [[https://chrishayward.xyz][personal website]] is a static HTML page written with [[https://gohugo.io][Hugo]], and is fully integrated into this configuration. + +It uses the ~config.toml~, ~config.yaml~, or ~config.json~ file (found in the sites root directory) as the default site config. + +#+BEGIN_SRC conf :noweb yes :tangle docs/config.toml +# <> +title = "Chris Hayward" +copyright = "Licensed under Attribution 4.0 International (CC BY 4.0)" +baseURL = "https://chrishayward.xyz/" +theme = "hello-friend-ng" +languageCode = "en-us" +defaultContentLanguage = "en" +pygmentsCodefences = true +pygmentsUseClasses = true + +<> +<> +<> +#+END_SRC + +** Params + +Dates are important in [[https://gohugo.io][Hugo]], and they configure how dates are assigned and displayed in your content pages. + +Themes are also able to extract information from the configuration to display, including social media icons, subtitles, and footer sections. + +#+NAME: website-params +#+BEGIN_SRC conf +[params] + dateform = "Jan 2, 2006" + dateformShort = "Jan 2" + dateformNum = "2006-01-02" + dateformNumTime = "2006-01-02 15:04 -0700" + authorName = "Christopher James Hayward" + homeSubtitle = "Airplanes, Linux, and Metalcore" + footerCopyright = ' · CC BY 4.0' + + [[params.social]] + name = "paypal" + url = "https://paypal.me/chrishaywardxyz" + + [[params.social]] + name = "github" + url = "https://github.com/chayward1/" + + [[params.social]] + name = "gitlab" + url = "https://gitlab.com/chayward1/" + + [[params.social]] + name = "email" + url = "mailto:chris@chrishayward.xyz" +#+END_SRC + +** Privacy + +I do not use any analytics or tracking in my website. Depending on the theme selected, some of these features may be enabled. I opt to override those settings here to make sure no unwanted trackers are loaded. + +#+NAME: website-privacy +#+BEGIN_SRC conf +[privacy] + [privacy.disqus] + disable = true + + [privacy.googleAnalytics] + disable = true + + [privacy.instagram] + disable = true + + [privacy.twitter] + disable = true + + [privacy.vimeo] + disable = true + + [privacy.youtube] + disable = true +#+END_SRC + +** Layout + +Individual pages can be configured here to define the layout of the page. This is where quick links can be configured, and other sections such as blog posts, an about section, or a contact page can be added. + +#+NAME: website-layout +#+BEGIN_SRC conf +[menu] + [[menu.main]] + identifier = "cloud" + name = "Cloud" + url = "https://cloud.chrishayward.xyz" + [[menu.main]] + identifier = "dotfiles" + name = "Dotfiles" + url = "/dotfiles" + [[menu.main]] + identifier = "projects" + name = "Projects" + url = "https://git.chrishayward.xyz" +#+END_SRC + * Footnotes diff --git a/docs/config.toml b/docs/config.toml index 0fef9c2..4dc70ad 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -1,3 +1,4 @@ +# This file is controlled by /etc/dotfiles/README.org title = "Chris Hayward" copyright = "Licensed under Attribution 4.0 International (CC BY 4.0)" baseURL = "https://chrishayward.xyz/" @@ -7,21 +8,12 @@ defaultContentLanguage = "en" pygmentsCodefences = true pygmentsUseClasses = true -[Author] - name = "Christopher James Hayward" - -[blackfriday] - nofollowLinks = true - noreferrerlinks = true - -[taxonomies] - tag = "tags" - [params] dateform = "Jan 2, 2006" dateformShort = "Jan 2" dateformNum = "2006-01-02" dateformNumTime = "2006-01-02 15:04 -0700" + authorName = "Christopher James Hayward" homeSubtitle = "Airplanes, Linux, and Metalcore" footerCopyright = ' · CC BY 4.0' @@ -40,7 +32,6 @@ pygmentsUseClasses = true [[params.social]] name = "email" url = "mailto:chris@chrishayward.xyz" - [privacy] [privacy.disqus] disable = true @@ -59,7 +50,6 @@ pygmentsUseClasses = true [privacy.youtube] disable = true - [menu] [[menu.main]] identifier = "cloud" @@ -72,4 +62,4 @@ pygmentsUseClasses = true [[menu.main]] identifier = "projects" name = "Projects" - url = "https://git.chrishayward.xyz" \ No newline at end of file + url = "https://git.chrishayward.xyz"