From ada741a6eb9bbff7b3331b79b63de5337b44fdde Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Fri, 21 Jun 2024 09:12:03 -0400 Subject: [PATCH 1/6] Need a new theme, terminal is discontinued --- config.toml => config.toml.bak | 8 +- config/_default/hugo.toml | 67 ++++++++++++++ config/_default/languages.en.toml | 69 ++++++++++++++ config/_default/markup.toml | 13 +++ config/_default/menus.en.toml | 69 ++++++++++++++ config/_default/module.toml | 3 + config/_default/params.toml | 149 ++++++++++++++++++++++++++++++ go.mod | 5 +- go.sum | 2 + 9 files changed, 380 insertions(+), 5 deletions(-) rename config.toml => config.toml.bak (96%) create mode 100644 config/_default/hugo.toml create mode 100644 config/_default/languages.en.toml create mode 100644 config/_default/markup.toml create mode 100644 config/_default/menus.en.toml create mode 100644 config/_default/module.toml create mode 100644 config/_default/params.toml diff --git a/config.toml b/config.toml.bak similarity index 96% rename from config.toml rename to config.toml.bak index 1931119..4914a5f 100644 --- a/config.toml +++ b/config.toml.bak @@ -9,10 +9,10 @@ enableGitInfo = true [module] # this is needed when you fetch the theme as a submodule to your repo. # replacements = "github.com/panr/hugo-theme-terminal -> themes/terminal" -[[module.imports]] - path = 'code.ndumas.com/ndumas/hugo-terminal-post-series' -[[module.imports]] - path = 'github.com/panr/hugo-theme-terminal/v3' +# [[module.imports]] + # path = 'code.ndumas.com/ndumas/hugo-terminal-post-series' +# [[module.imports]] + # path = 'github.com/panr/hugo-theme-terminal/v3' [permalinks] posts = "/:year/:month/:filename" diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml new file mode 100644 index 0000000..8641c4f --- /dev/null +++ b/config/_default/hugo.toml @@ -0,0 +1,67 @@ +# -- Site Configuration -- +# Refer to the theme docs for more details about each of these parameters. +# https://blowfish.page/docs/getting-started/ + +# theme = "blowfish" # UNCOMMENT THIS LINE +# baseURL = "https://your_domain.com/" +defaultContentLanguage = "en" + +# pluralizeListTitles = "true" # hugo function useful for non-english languages, find out more in https://gohugo.io/getting-started/configuration/#pluralizelisttitles + +enableRobotsTXT = true +paginate = 10 +summaryLength = 0 + +buildDrafts = false +buildFuture = false + +enableEmoji = true + +# googleAnalytics = "G-XXXXXXXXX" + +[imaging] + anchor = 'Center' + +[taxonomies] + tag = "tags" + category = "categories" + author = "authors" + series = "series" + +[sitemap] + changefreq = 'daily' + filename = 'sitemap.xml' + priority = 0.5 + +[outputs] + home = ["HTML", "RSS", "JSON"] + +[related] + threshold = 0 + toLower = false + + [[related.indices]] + name = "tags" + weight = 100 + + [[related.indices]] + name = "categories" + weight = 100 + + [[related.indices]] + name = "series" + weight = 50 + + [[related.indices]] + name = "authors" + weight = 20 + + [[related.indices]] + name = "date" + weight = 10 + + [[related.indices]] + applyFilter = false + name = 'fragmentrefs' + type = 'fragments' + weight = 10 diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml new file mode 100644 index 0000000..2b19614 --- /dev/null +++ b/config/_default/languages.en.toml @@ -0,0 +1,69 @@ +languageCode = "en" +languageName = "English" +weight = 1 +title = "Blowfish" + +[params] + displayName = "EN" + isoCode = "en" + rtl = false + dateFormat = "2 January 2006" + # logo = "img/logo.png" + # secondaryLogo = "img/secondary-logo.png" + # description = "My awesome website" + # copyright = "Copy, _right?_ :thinking_face:" + +# [author] +# name = "Your name here" +# image = "img/blowfish_logo.png" +# headline = "I'm only human" +# bio = "A little bit about you" +# links = [ +# { email = "mailto:hello@your_domain.com" }, +# { link = "https://link-to-some-website.com/" }, +# { amazon = "https://www.amazon.com/hz/wishlist/ls/wishlist-id" }, +# { apple = "https://www.apple.com" }, +# { blogger = "https://username.blogspot.com/" }, +# { bluesky = "https://bsky.app/profile/username" }, +# { codepen = "https://codepen.io/username" }, +# { dev = "https://dev.to/username" }, +# { discord = "https://discord.gg/invitecode" }, +# { dribbble = "https://dribbble.com/username" }, +# { facebook = "https://facebook.com/username" }, +# { flickr = "https://www.flickr.com/photos/username/" }, +# { foursquare = "https://foursquare.com/username" }, +# { github = "https://github.com/username" }, +# { gitlab = "https://gitlab.com/username" }, +# { google = "https://www.google.com/" }, +# { hashnode = "https://username.hashnode.dev" }, +# { instagram = "https://instagram.com/username" }, +# { itch-io = "https://username.itch.io" }, +# { keybase = "https://keybase.io/username" }, +# { kickstarter = "https://www.kickstarter.com/profile/username" }, +# { lastfm = "https://lastfm.com/user/username" }, +# { linkedin = "https://linkedin.com/in/username" }, +# { mastodon = "https://mastodon.instance/@username" }, +# { medium = "https://medium.com/username" }, +# { microsoft = "https://www.microsoft.com/" }, +# { orcid = "https://orcid.org/userid" }, +# { patreon = "https://www.patreon.com/username" }, +# { pinterest = "https://pinterest.com/username" }, +# { reddit = "https://reddit.com/user/username" }, +# { researchgate = "https://www.researchgate.net/profile/username" }, +# { slack = "https://workspace.url/team/userid" }, +# { snapchat = "https://snapchat.com/add/username" }, +# { soundcloud = "https://soundcloud.com/username" }, +# { stack-overflow = "https://stackoverflow.com/users/userid/username" }, +# { steam = "https://steamcommunity.com/profiles/userid" }, +# { telegram = "https://t.me/username" }, +# { threads = "https://www.threads.net/@username" }, +# { tiktok = "https://tiktok.com/@username" }, +# { tumblr = "https://username.tumblr.com" }, +# { twitch = "https://twitch.tv/username" }, +# { twitter = "https://twitter.com/username" }, +# { x-twitter = "https://twitter.com/username" }, +# { whatsapp = "https://wa.me/phone-number" }, +# { youtube = "https://youtube.com/username" }, +# { ko-fi = "https://ko-fi.com/username" }, +# { codeberg = "https://codeberg.org/username"}, +# ] diff --git a/config/_default/markup.toml b/config/_default/markup.toml new file mode 100644 index 0000000..c5449fc --- /dev/null +++ b/config/_default/markup.toml @@ -0,0 +1,13 @@ +# -- Markup -- +# These settings are required for the theme to function. + +[goldmark] +[goldmark.renderer] + unsafe = true + +[highlight] + noClasses = false + +[tableOfContents] + startLevel = 2 + endLevel = 4 diff --git a/config/_default/menus.en.toml b/config/_default/menus.en.toml new file mode 100644 index 0000000..579cedd --- /dev/null +++ b/config/_default/menus.en.toml @@ -0,0 +1,69 @@ +# -- Main Menu -- +# The main menu is displayed in the header at the top of the page. +# Acceptable parameters are name, pageRef, page, url, title, weight. +# +# The simplest menu configuration is to provide: +# name = The name to be displayed for this menu link +# pageRef = The identifier of the page or section to link to +# +# By default the menu is ordered alphabetically. This can be +# overridden by providing a weight value. The menu will then be +# ordered by weight from lowest to highest. + +#[[main]] +# name = "Blog" +# pageRef = "posts" +# weight = 10 + +#[[main]] +# name = "Parent" +# weight = 20 + +#[[main]] +# name = "example sub-menu 1" +# parent = "Parent" +# pageRef = "posts" +# weight = 20 + +#[[main]] +# name = "example sub-menu 2" +# parent = "Parent" +# pageRef = "posts" +# weight = 20 + +#[[subnavigation]] +# name = "An interesting topic" +# pageRef = "tags/interesting-topic" +# weight = 10 + +#[[subnavigation]] +# name = "My Awesome Category" +# pre = "github" +# pageRef = "categories/awesome" +# weight = 20 + +#[[main]] +# name = "Categories" +# pageRef = "categories" +# weight = 20 + +#[[main]] +# name = "Tags" +# pageRef = "tags" +# weight = 30 + + +# -- Footer Menu -- +# The footer menu is displayed at the bottom of the page, just before +# the copyright notice. Configure as per the main menu above. + + +# [[footer]] +# name = "Tags" +# pageRef = "tags" +# weight = 10 + +# [[footer]] +# name = "Categories" +# pageRef = "categories" +# weight = 20 diff --git a/config/_default/module.toml b/config/_default/module.toml new file mode 100644 index 0000000..74f7727 --- /dev/null +++ b/config/_default/module.toml @@ -0,0 +1,3 @@ +[hugoVersion] + extended = false + min = "0.87.0" diff --git a/config/_default/params.toml b/config/_default/params.toml new file mode 100644 index 0000000..10cfec1 --- /dev/null +++ b/config/_default/params.toml @@ -0,0 +1,149 @@ +# -- Theme Options -- +# These options control how the theme functions and allow you to +# customise the display of your website. +# +# Refer to the theme docs for more details about each of these parameters. +# https://blowfish.page/docs/configuration/#theme-parameters + +colorScheme = "blowfish" +defaultAppearance = "light" # valid options: light or dark +autoSwitchAppearance = true + +enableSearch = true +enableCodeCopy = false + +# mainSections = ["section1", "section2"] +# robots = "" + +disableImageOptimization = false +disableTextInHeader = false + +# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images +# defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles + +# highlightCurrentMenuArea = true +# smartTOC = true +# smartTOCHideUnfocusedChildren = true + +[header] + layout = "basic" # valid options: basic, fixed, fixed-fill, fixed-gradient, fixed-fill-blur + +[footer] + showMenu = true + showCopyright = true + showThemeAttribution = true + showAppearanceSwitcher = true + showScrollToTop = true + +[homepage] + layout = "profile" # valid options: page, profile, hero, card, background, custom + #homepageImage = "IMAGE.jpg" # used in: hero, and card + showRecent = false + showRecentItems = 5 + showMoreLink = false + showMoreLinkDest = "/posts" + cardView = false + cardViewScreenWidth = false + layoutBackgroundBlur = false # only used when layout equals background + +[article] + showDate = true + showViews = false + showLikes = false + showDateOnlyInArticle = false + showDateUpdated = false + showAuthor = true + # showAuthorBottom = false + showHero = false + # heroStyle = "basic" # valid options: basic, big, background, thumbAndBackground + layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground + layoutBackgroundHeaderSpace = true # only used when heroStyle equals background + showBreadcrumbs = false + showDraftLabel = true + showEdit = false + # editURL = "https://github.com/username/repo/" + editAppendPath = true + seriesOpened = false + showHeadingAnchors = true + showPagination = true + invertPagination = false + showReadingTime = true + showTableOfContents = false + # showRelatedContent = false + # relatedContentLimit = 3 + showTaxonomies = false + showAuthorsBadges = false + showWordCount = true + # sharingLinks = [ "linkedin", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram"] + showZenMode = false + +[list] + showHero = false + # heroStyle = "background" # valid options: basic, big, background, thumbAndBackground + layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground + layoutBackgroundHeaderSpace = true # only used when heroStyle equals background + showBreadcrumbs = false + showSummary = false + showViews = false + showLikes = false + showTableOfContents = false + showCards = false + orderByWeight = false + groupByYear = true + cardView = false + cardViewScreenWidth = false + constrainItemsWidth = false + +[sitemap] + excludedKinds = ["taxonomy", "term"] + +[taxonomy] + showTermCount = true + showHero = false + # heroStyle = "background" # valid options: basic, big, background, thumbAndBackground + showBreadcrumbs = false + showViews = false + showLikes = false + showTableOfContents = false + cardView = false + +[term] + showHero = false + # heroStyle = "background" # valid options: basic, big, background, thumbAndBackground + showBreadcrumbs = false + showViews = false + showLikes = false + showTableOfContents = true + groupByYear = false + cardView = false + cardViewScreenWidth = false + +[firebase] + # apiKey = "XXXXXX" + # authDomain = "XXXXXX" + # projectId = "XXXXXX" + # storageBucket = "XXXXXX" + # messagingSenderId = "XXXXXX" + # appId = "XXXXXX" + # measurementId = "XXXXXX" + +[fathomAnalytics] + # site = "ABC12345" + # domain = "llama.yoursite.com" + +[umamiAnalytics] + # websiteid = "ABC12345" + # domain = "llama.yoursite.com" + +[buymeacoffee] + # identifier = "" + # globalWidget = true + # globalWidgetMessage = "Hello" + # globalWidgetColor = "#FFDD00" + # globalWidgetPosition = "Right" + +[verification] + # google = "" + # bing = "" + # pinterest = "" + # yandex = "" diff --git a/go.mod b/go.mod index 7b66bd4..1bfa2d8 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,7 @@ module blog.ndumas.com go 1.19 -require github.com/panr/hugo-theme-terminal/v3 v3.1.2 // indirect +require ( + github.com/nunocoracao/blowfish/v2 v2.71.0 // indirect + github.com/panr/hugo-theme-terminal/v3 v3.1.2 // indirect +) diff --git a/go.sum b/go.sum index c8e1900..29999fe 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,4 @@ +github.com/nunocoracao/blowfish/v2 v2.71.0 h1:NOhQxzXXZklESBIejBMeOgNgUIEuOjdU0EuBIGk+sH0= +github.com/nunocoracao/blowfish/v2 v2.71.0/go.mod h1:4SkMc+Ht8gpQCwArqiHMBDP3soxi2OWuAhVney+cuyk= github.com/panr/hugo-theme-terminal/v3 v3.1.2 h1:DZXzAabj8zG/9k6kSE9uQLtJUoPGA5KiSeiBbni3oHM= github.com/panr/hugo-theme-terminal/v3 v3.1.2/go.mod h1:Cs+1ub6qhz/G43ohdRSR1U2qNqGLO9h0qgTG4Jq9Wo4= From aa875beb3a3bb777490f81d8221ed5e03192ab43 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 24 Jun 2024 16:15:35 -0400 Subject: [PATCH 2/6] Working on drafts and dev versions of the site --- .drone.yml | 84 +++++++++++++++++++++++++++++++ layouts/partials/extend-head.html | 1 + 2 files changed, 85 insertions(+) create mode 100644 .drone.yml create mode 100644 layouts/partials/extend-head.html diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..b2128bc --- /dev/null +++ b/.drone.yml @@ -0,0 +1,84 @@ +kind: pipeline +name: blog + +clone: + depth: 1 + +steps: +- name: hugo + image: code.ndumas.com/ndumas/hugo + commands: + - hugo -d /drone/src/public/ --baseUrl https://blog.ndumas.com +- name: publish + depends_on: + - hugo + image: drillster/drone-rsync + settings: + key: + from_secret: BLOG_DEPLOY_KEY + user: blog + delete: true + recursive: true + hosts: ["blog.ndumas.com"] + source: /drone/src/public/ + target: /var/www/blog.ndumas.com/ + include: ["*"] +branches: +- main +--- +kind: pipeline +name: dev + +clone: + depth: 1 + +steps: +- name: hugo + image: code.ndumas.com/ndumas/hugo + commands: + - hugo -d /drone/src/public/ --baseUrl https://dev.blog.ndumas.com +- name: publish + depends_on: + - hugo + image: drillster/drone-rsync + settings: + key: + from_secret: BLOG_DEPLOY_KEY + user: blog + delete: true + recursive: true + hosts: ["blog.ndumas.com"] + source: /drone/src/public/ + target: /var/www/dev.blog.ndumas.com/ + include: ["*"] +branches: +- dev +--- +kind: pipeline +name: drafts + +clone: + depth: 1 + +steps: +- name: hugo + image: code.ndumas.com/ndumas/hugo + commands: + - hugo -DF -d /drone/src/public/ --baseUrl https://drafts.blog.ndumas.com +- name: publish + depends_on: + - hugo + image: drillster/drone-rsync + settings: + key: + from_secret: BLOG_DEPLOY_KEY + user: blog + delete: true + recursive: true + hosts: ["blog.ndumas.com"] + source: /drone/src/public/ + target: /var/www/drone.blog.ndumas.com/ + include: ["*"] +branches: +- dev +--- diff --git a/layouts/partials/extend-head.html b/layouts/partials/extend-head.html new file mode 100644 index 0000000..9c5a62a --- /dev/null +++ b/layouts/partials/extend-head.html @@ -0,0 +1 @@ + From c43e1092f2663e2f6484361013757397acc48a80 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 24 Jun 2024 16:17:45 -0400 Subject: [PATCH 3/6] multi-document yaml sucks --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index b2128bc..33c4eaa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,4 @@ +--- kind: pipeline name: blog From 7d50c00367194f89f5cef1fd30bf1b27f08c0eee Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 24 Jun 2024 16:20:33 -0400 Subject: [PATCH 4/6] Trailing --- was messing me up I think --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 33c4eaa..db553be 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ ---- kind: pipeline name: blog +type: docker clone: depth: 1 @@ -29,6 +29,7 @@ branches: --- kind: pipeline name: dev +type: docker clone: depth: 1 @@ -57,6 +58,7 @@ branches: --- kind: pipeline name: drafts +type: docker clone: depth: 1 @@ -82,4 +84,3 @@ steps: include: ["*"] branches: - dev ---- From b24be84f238329fba1899b681b0a975407b533b7 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 24 Jun 2024 16:23:39 -0400 Subject: [PATCH 5/6] Misspelled target directory --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index db553be..d1e3b19 100644 --- a/.drone.yml +++ b/.drone.yml @@ -80,7 +80,7 @@ steps: recursive: true hosts: ["blog.ndumas.com"] source: /drone/src/public/ - target: /var/www/drone.blog.ndumas.com/ + target: /var/www/drafts.blog.ndumas.com/ include: ["*"] branches: - dev From fb40708b9957a5c421394a81862e5dc7f5566157 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 24 Jun 2024 16:34:07 -0400 Subject: [PATCH 6/6] making this a little smarter --- config/_default/params.toml | 7 ++++++- layouts/partials/extend-head.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 10cfec1..c0d414c 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -18,7 +18,7 @@ enableCodeCopy = false disableImageOptimization = false disableTextInHeader = false -# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images +# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles # highlightCurrentMenuArea = true @@ -147,3 +147,8 @@ disableTextInHeader = false # bing = "" # pinterest = "" # yandex = "" + +[AnalyticsURL] + "https://blog.ndumas.com" = "blog.ndumas.com" + "https://drafts.blog.ndumas.com" = "drafts.blog.ndumas.com" + "https://dev.blog.ndumas.com" = "dev.blog.ndumas.com" diff --git a/layouts/partials/extend-head.html b/layouts/partials/extend-head.html index 9c5a62a..3130418 100644 --- a/layouts/partials/extend-head.html +++ b/layouts/partials/extend-head.html @@ -1 +1 @@ - +