Configuration improvements

This commit is contained in:
Salar Rahmanian 2022-10-15 11:43:48 -07:00
parent 17371397e4
commit 9f67984ac4
9 changed files with 352 additions and 99 deletions

View file

@ -1,25 +1,40 @@
name: Build and Deploy name: Build and Deploy
on: on:
pull_request:
push: push:
branches: branches:
- master - master
jobs: jobs:
build: build:
name: Build and Deploy name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
submodules: true
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.104.3' hugo-version: '0.104.3'
extended: true extended: true
- name: Hugo Build
run: hugo --minify
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.104.3'
extended: true
- name: Configure AWS Credentials - name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1
with: with:
@ -27,8 +42,6 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1 aws-region: us-east-1
- name: Hugo Build
run: hugo --minify
- name: Deploy to S3 - name: Deploy to S3
run: hugo deploy --maxDeletes -1 --invalidateCDN run: hugo deploy --maxDeletes -1 --invalidateCDN

View file

@ -1,90 +0,0 @@
baseurl = "https://www.softinio.com/"
title = "Salar Rahmanian"
author = "Salar Rahmanian"
enableRobotsTXT = true
enableEmoji = true
paginate = 10
[markup]
[markup.highlight]
codeFences = true
guessSyntax = true
hl_Lines = "--"
lineNoStart = 1
lineNos = true # always set to true # else line numbers won't show at all! even when you toggle them on in the UI
lineNumbersInTable = false # toggling this on (i.e to true) or deleting this line will break the code blocks functionality. Will
noClasses = false
# style = "monokai"
tabWidth = 2
[markup.goldmark.renderer]
hardWraps = false
unsafe = false # change to true to enable inclusion of rawHTML and math functions
xhtml = false
[params]
author = "Salar Rahmanian"
twitter = "@SalarRahmanian"
largeTwitterCard = true
introDescription = "Software Engineer based in San Francisco Bay Area."
# ga_analytics = "UA-47014432-1"
ga_analytics = "G-XZR9K3MDHX"
matomo_site_id = "2"
numberOfTagsShown = 14
fallBackOgImage = "salar.jpg"
codeMaxLines = 10
codeLineNumbers = false
mainSections = ["post"]
centerLogo = false
# logo = "salar.jpg"
figurePositionShow = false
figurePositionLabel = "Figure"
mobileNavigation = "left"
description = "Salar Rahmanian"
keywords = ["Salar", "Rahmanian", "Salar Rahmanian", "Blog", "python", "scala", "haskell", "nix", "NixOS"]
[params.giscus]
enable = true
[sitemap]
changefreq = "weekly"
priority = 0.5
filename = "sitemap.xml"
[outputs]
home = ["html", "jsonfeed","rss"]
page = ["html"]
[outputFormats]
[outputFormats.jsonfeed]
mediaType = "application/json"
baseName = "feed"
isPlainText = true
[deployment]
order = [".png$", ".jpg$", ".gif$", ".svg$"]
[[deployment.targets]]
name = "softinio-deploy"
URL = "s3://www.softinio.com?region=us-east-1"
cloudFrontDistributionID = "E1CMSLHG2WR51C"
[[deployment.matchers]]
# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(png|jpg)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = false
[[deployment.matchers]]
pattern = "^.+\\.(html|xml|json)$"
gzip = true
[[module.imports]]
path = "github.com/softinio/hugo-clarity"

View file

@ -0,0 +1,63 @@
baseurl = "https://www.softinio.com/"
title = "Salar Rahmanian"
author = "Salar Rahmanian"
enableRobotsTXT = true
enableEmoji = true
paginate = 10
# title = "Clarity" # Edit directly from config/_default/languages.toml # alternatively, uncomment this and remove `title` entry from the aforemention file.
# copyright = "Copyright © 20082018, Steve Francia and the Hugo Authors; all rights reserved."
# canonifyurls = true
theme = ["github.com/softinio/hugo-clarity"]
# disqusShortname = ""
DefaultContentLanguage = "en"
# [languages]
# config/_default/languages.toml
# [menus]
# config/_default/menus/menu.xx.toml
# [outputs]
# home = ["HTML", "RSS", "JSON"]
# page = ["html"]
[outputs]
home = ["html", "jsonfeed","rss"]
page = ["html"]
[outputFormats]
[outputFormats.jsonfeed]
mediaType = "application/json"
baseName = "feed"
isPlainText = true
[sitemap]
changefreq = "weekly"
priority = 0.5
filename = "sitemap.xml"
[deployment]
order = [".png$", ".jpg$", ".gif$", ".svg$"]
[[deployment.targets]]
name = "softinio-deploy"
URL = "s3://www.softinio.com?region=us-east-1"
cloudFrontDistributionID = "E1CMSLHG2WR51C"
[[deployment.matchers]]
# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(png|jpg)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = false
[[deployment.matchers]]
pattern = "^.+\\.(html|xml|json)$"
gzip = true

View file

@ -25,4 +25,5 @@ simple = true
[privacy.youtube] [privacy.youtube]
disabled = false disabled = false
privacyEnhanced = true privacyEnhanced = true

View file

@ -0,0 +1,10 @@
[en]
title = "Clarity"
LanguageName = "English"
weight = 1
[pt]
title = "Claridade" # just for the sake of showing this is possible
LanguageName = "Português"
weight = 2

View file

@ -0,0 +1,17 @@
[goldmark]
[goldmark.renderer]
hardWraps = false
unsafe = true # change to false to disable inclusion of rawHTML and math functions
xhtml = false
[goldmark.extensions]
typographer = false
[highlight]
codeFences = true
guessSyntax = true
hl_Lines = "--"
lineNoStart = 1
lineNos = true # always set to true # else line numbers won't show at all! even when you toggle them on in the UI
lineNumbersInTable = false # toggling this on (i.e to true) or deleting this line will break the code blocks functionality. Will
noClasses = false
# style = "monokai"
tabWidth = 2

View file

@ -0,0 +1,89 @@
[[main]]
name = "Salar Rahmanian"
url = ""
weight = -110
[[main]]
name = "About"
url = "about/"
weight = -109
[[main]]
name = "Resume"
url = "resume/"
weight = -108
[[main]]
name = "Newsletter"
url = "http://newsletter.softinio.com"
weight = -107
[[main]]
name = "Watch"
url = "https://watch.softinio.com/c/softinio/videos"
weight = -106
# Submenus are done this way: parent -> identifier
# [[main]]
# name = "Links"
# identifier = "Links"
# weight = -108
# [[main]]
# parent = "Links"
# name = "LinkedIn"
# url = "https://www.linkedin.com/"
# [[main]]
# parent = "Links"
# name = "Twitter"
# url = "https://twitter.com/"
# [[main]]
# name = "About"
# url = "about/"
# weight = -107
# social menu links
[[social]]
name = "gitea"
weight = 1
url = "https://git.softinio.com/softinio"
[[social]]
name = "github"
type = "social"
weight = 2
url = "https://github.com/softinio"
[[social]]
name = "twitter"
weight = 3
url = "https://twitter.com/SalarRahmanian"
[[social]]
name = "linkedin"
weight = 4
url = "https://www.linkedin.com/in/salarrahmanian"
[[social]]
name = "youtube"
weight = 5
url = "https://softin.io/youtube"
[[social]]
name = "mastedon"
weight = 6
url = "https://fosstodon.org/@softinio"
[[social]]
name = "rss"
weight = 7
url = "index.xml"
# other supported social links
# name = "youtube"
# url = "https://www.youtube.com/#"
# name = "facebook"
# url = "https://facebook.com/#"
# name = "instagram"
# url = "https://instagram.com/#"
# name = "stackoverflow"
# url = "https://stackoverflow.com/#"
# name = "gitlab"
# url = "https://gitlab.com/#"
# name = "discord"
# url = "https://discord.gg/#"

150
config/_default/params.toml Normal file
View file

@ -0,0 +1,150 @@
# enable search
enableSearch = true
# socials
twitter = "@SalarRahmanian"
largeTwitterCard = true
introDescription = "Software Engineer based in San Francisco Bay Area."
description = "Salar Rahmanian"
keywords = ["Salar", "Rahmanian", "Salar Rahmanian", "Blog", "python", "scala", "haskell", "nix", "NixOS"]
# showShare = false # Uncomment to not show share buttons on each post. Also available in each post's front matter.
# Google analytics Id
ga_analytics = "G-XZR9K3MDHX"
# Matomo ID
matomo_site_id = "2"
# limit the number of taxonomies links shown on the sidebar of each page by default.
numberOfTagsShown = 14 # Applies for all other default & custom taxonomies. e.g categories, brands see https://gohugo.io/content-management/taxonomies#what-is-a-taxonomy
# Whether to default to storing images and other assets in the `static` directory, or use Hugo page bundles.
# Switch to `true` if you'd like to group assets with the post itself (as a "leaf bundle").
# This can be overridden at the page level; what is set below acts as the default if no page variable is set.
# Details on page bundles: https://gohugo.io/content-management/page-bundles/#leaf-bundles
usePageBundles = false
# Path variables
#
# By default, each of these directories are children of the `static` directory.
#
# In some Apache server installs, these directory names could conflict and you
# may want to change them. See:
# https://github.com/chipzoller/hugo-clarity/issues/74
#
# If you change the names of these directories, be sure to copy the contents of
# the originals to get the files included with Hugo Clarity.
#
# Images:
imagesDir = "img/" # without a leading forward slash
# Icons:
iconsDir = "icons/" # without a leading forward slash
# Fonts:
fontsDir = "fonts/" # without a leading forward slash
# Social media sharing image: Will be used on Twitter, Facebook, LinkedIn, etc.
# when a given page has no other image present.
fallBackOgImage = "salar.jpg"
# Logo image
# logo = "salar.jpg"
# center logo on navbar
centerLogo = false # Set to "true" for centering or "false" for left aligned.
# sets the maximum number of lines per codeblock. The codeblock will however be scrollable and expandable.
codeMaxLines = 10
# disable showing line numbers by default. Switch to `true` if you'd rather have them on.
codeLineNumbers = false
# enable math notation. Switch to `true` to enable mathjax in your site.
enableMathNotation = false
# directory(s) where your articles are located
mainSections = ["post"] # see config details here https://gohugo.io/functions/where/#mainsections
# Label Non inline images on an article body
figurePositionShow = false # toggle on or off globally
# you can toggle this behaviour on or off on per page using the same variable inside your articles frontmatter
figurePositionLabel = "Figure" # the text before image number e.g Figure 1.0
# Set the collapsed mobile navigation to either appear from the left or the right
mobileNavigation = "left" # if you prefer right change to 'right'
# some site owners want to decide how they would like their sites to be introduced users. These settings give you as a site owner to decide how the user will view your site for the first time.
# please note that you cannot enforce both modes at the same time. i.e by enforcing one mode, you priotise it over the other (by setting it to true). enforceDarkMode will be commented out
# please also not that mode toggle UI will remain in place. That way, if a user prefers darkmode, they can have their way.
enforceLightMode = false
# enforceDarkMode = false
# customize footer icon. see issue https://github.com/chipzoller/hugo-clarity/issues/77
# footerLogo = "icons/copy.svg"
# Customize Sidebar Disclaimer Text
# sidebardisclaimer = true
# disclaimerText = "The opinions expressed on this site are my own personal opinions and do not represent my employers view in any way."
# Text for the languages menu.
languageMenuName = "🌐"
# Title separator, default to |.
# titleSeparator = "|"
# Enable or disable comments globally. Default to true.
# comments = false
# Enable or disable Utterances (https://github.com/utterance/utterances) Github Issue-Based Commenting
# utterances = true #Run the utterances script in the single.html layout to load https://utteranc.es comments
# utterancesRepo = "GHUsername/Repository.Name" # Utterances is enabled when this param is set
# utterancesTheme = "github-light" # Default: github-dark
# utterancesIssueTerm = "pathname" # Default: pathname
# Maximum number of recent posts. (default: 8)
# numberOfRecentPosts = 8
# Maximum number of featured posts. (default: 8)
# numberOfFeaturedPosts = 8
# Pin featured posts in list.
# pinFeatured = true
# Maximum number of pinned featured posts. (default: 8)
# numberOfPinnedPosts = 8
# Date format. Checkout https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference for details.
# dateFormat = "2006-01-02" # Default to "Jan 2, 2006".
# customFonts = false # toggle to true if you want to use custom fonts only.
# The year when ths website was created, this value is used in the copyright
# notice of the footer.
# since = 2016
# Show related content at the end of an article based on the 'series' taxonomy. Can be set in post front matter.
# showRelatedInArticle = false
# showRelatedInSidebar = false
# website author
[author]
name = "Salar Rahmanian"
photo = "salar.jpg"
[plausible_analytics]
enable = false # to enable plausible analytics set to true.
websiteDomain = "example.com" # domain name of your website, most cases same as your base url
# plausibleDomain = "plausible.io" # default is set to plausible.io, only required if plausible is selfhosted
# scritpName = "plausible" # default is set to plausible, only required if using a custome name for script
[matomo_analytics]
enable = false # To enable matomo analytics change to `true`.
websiteDomain = "example.com" # Set the domain name of your website, in most cases same as your base URL this is required.
matomoDomain = "matomo.example.com" # Set to Matomo domain
matomoSiteID = "1" # Default is set to 1, change this to the siteid being tracked
[giscus]
enable = true

BIN
static/img/techstack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB