diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c9ce99b..56de5d7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,9 +9,6 @@ on: - '!master' # excludes master - '!main' # excludes main - '**' # matches every branch - branches-ignore: - - 'master' # excludes master - - 'main' # excludes main # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 1a5e617..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "themes/toha"] - path = themes/toha - url = https://github.com/hugo-toha/toha/ -[submodule "themes/hugo-video"] - path = themes/hugo-video - url = https://github.com/martignoni/hugo-video.git diff --git a/assets/js/navbar.js b/assets/js/not-navbarjs similarity index 100% rename from assets/js/navbar.js rename to assets/js/not-navbarjs diff --git a/assets/js/projects.js b/assets/js/projects.js new file mode 100644 index 0000000..cbe0b79 --- /dev/null +++ b/assets/js/projects.js @@ -0,0 +1,19 @@ +import Filterizr from 'filterizr' +import { insertScript } from '../core' + +document.addEventListener('DOMContentLoaded', () => { + // ================== Project cards ===================== + + // setup project filter buttons + const projectCardHolder = document.getElementById('project-card-holder') + if (projectCardHolder != null && projectCardHolder.children.length !== 0) { + // eslint-disable-next-line no-new + new Filterizr('.filtr-projects', { + layout: 'sameWidth', + controlsSelector: '.project-filtr-control' + }) + } +}) + +// dynamically insert github buttons script. +insertScript('github-buttons', 'https://buttons.github.io/buttons.js') diff --git a/config.yaml b/config.yaml index 7927fce..a1b3987 100644 --- a/config.yaml +++ b/config.yaml @@ -55,18 +55,20 @@ markup: endLevel: 6 ordered: false -# Enable Google Analytics -# .Site.Config.Services.GoogleAnalytics.ID: UA-10503049-6 -analytics: - enable: true - services: - google: - id: UA-10503049-6 # Enable global emoji support enableEmoji: true +# At least HTML and JSON are required for the main HTML content and +# client-side JavaScript search +outputs: + home: + - HTML + - RSS + - JSON + # Site parameters params: + # Background image of the landing page background: /images/site/background2.jpg hero-background: /images/site/blue-bg.jpg @@ -77,6 +79,17 @@ params: enable: true flags: enable: true + # Enable Google Analytics + analytics: + enabled: true + services: + google: + id: UA-10503049-6 + statcounter: + project: 10096606 + security: 2eda6207 + invisible: 1 + # Provide logos for your site. The inverted logo will be used in the initial # transparent navbar and the main logo will be used in the non-transparent navbar. # It will default to the theme logos if not provided. @@ -116,4 +129,12 @@ module: - source: ./node_modules/@fontsource/mulish/files target: static/files - source: ./node_modules/katex/dist/fonts - target: static/fonts \ No newline at end of file + target: static/fonts + +privacy: + googleAnalytics: + disable: false + respectDoNotTrack: true + statcounter: + disable: false + respectDoNotTrack: true diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html new file mode 100644 index 0000000..df6e52e --- /dev/null +++ b/layouts/partials/analytics.html @@ -0,0 +1,85 @@ + +{{ with site.Params.features.analytics }} + {{ if or .enable .enabled }} + + {{ with .services }} + + {{ with .google }} + {{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }} + {{ $analyticsConfig := dict (slice "Site" "Config" "Services" "GoogleAnalytics" "ID") .id }} + {{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }} + {{ end }} + + + {{ with .counterDev }} + + {{ end }} + + + {{ with .goatCounter }} + {{ with .code }} + + {{ else }} + + {{ end }} + {{ end }} + + + {{ with .matomo }} + + + {{ end }} + + {{ with .cloudflare }} + + + + {{ end }} + + {{ with .umami }} + + + + {{end}} + + {{ with .statcounter }} + + + {{ end }} + {{ end }} + {{ end }} +{{ end }} + + +{{ if .Site.Config.Services.GoogleAnalytics.ID }} + {{ template "_internal/google_analytics.html" . }} +{{ end }} diff --git a/layouts/partials/cards/post.html b/layouts/partials/cards/post.html new file mode 100644 index 0000000..26dd7c7 --- /dev/null +++ b/layouts/partials/cards/post.html @@ -0,0 +1,19 @@ +
+ +
+
+ + +
+
+
{{ .Title }}
+

{{ .Summary }}

+

Reading Time: {{ .ReadingTime }} minutes

+
+
+
+ +
\ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 898bfa3..eab18e9 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -141,5 +141,4 @@
Site Details:
- {{ partial "helpers/statcounter.html" }} diff --git a/layouts/partials/helpers/statcounter.html b/layouts/partials/helpers/statcounterhtml similarity index 80% rename from layouts/partials/helpers/statcounter.html rename to layouts/partials/helpers/statcounterhtml index 4af5107..e903ab5 100644 --- a/layouts/partials/helpers/statcounter.html +++ b/layouts/partials/helpers/statcounterhtml @@ -1,6 +1,6 @@ -