From afc0dfaf712582468fa25102af59cf39d95887e6 Mon Sep 17 00:00:00 2001 From: Dre Cura Date: Sat, 2 Mar 2024 22:19:41 -0500 Subject: [PATCH] hopefully this helps with SEO --- .gitignore | 2 + config.toml | 8 ++-- layouts/partials/head.html | 94 ++++++++++++++++++++++++++++++++++++++ robots.txt | 2 + 4 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 layouts/partials/head.html create mode 100644 robots.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73ab876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +public/ +resources/ diff --git a/config.toml b/config.toml index b9ba19a..93f2f30 100644 --- a/config.toml +++ b/config.toml @@ -5,6 +5,8 @@ title = 'kako57' theme = "terminal" paginate = 10 +enableRobotsTXT = true + [params] # dir name of your main content (default is `content/posts`). # the list of set content will show up on your index page (baseurl). @@ -59,8 +61,8 @@ paginate = 10 # set Twitter handles for Twitter cards # see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution # do not include @ - creator = "" - site = "" + creator = "dre_cura" + site = "https://twitter.com/dre_cura" [languages] [languages.en] @@ -68,7 +70,7 @@ paginate = 10 title = "kako57's blog" subtitle = "kako57's blog" owner = "kako57" - keywords = "" + keywords = "Reverse Engineering, Binary Exploitation, CTF, Capture the Flag, Hacking, Cybersecurity, Vulnerability Research, Dre Cura, drec, kako57" copyright = "" menuMore = "Show more" readMore = "Read more" diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..db49500 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,94 @@ + + + + + + + +{{ template "_internal/google_analytics.html" . }} + +{{ $defaultStyles := resources.Get "css/style.scss" }} + +{{ if and (isset .Params "color") (not (eq .Params.color "")) }} + {{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }} + {{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }} + {{ $localColorStyles := $localCss | resources.ToCSS }} + +{{ else }} + + {{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }} + {{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }} + {{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} + {{ $styles := $css | resources.ToCSS $options }} + +{{ end }} + + +{{ if (fileExists "static/style.css") -}} + +{{- end }} + + +{{ if isset $.Site.Params "favicon" }} + +{{ else }} + + +{{ end }} + + + +{{ if (isset $.Site.Params "twitter") }} + {{ if (isset $.Site.Params.Twitter "site") }} + + {{ end }} + +{{ end }} + + + + + + + + +{{ if (isset .Params "cover") }} + {{ $pageCover := .Param "cover" }} + {{ with (.Resources.GetMatch (.Param "cover")) }} + {{ $pageCover = .RelPermalink }} + {{ end }} + +{{ else }} + {{ if isset $.Site.Params "favicon" }} + + {{ else }} + + {{ end }} +{{ end }} + + +{{ range .Params.categories }} + +{{ end }} +{{ if isset .Params "date" }} + +{{ end }} + + +{{ with .OutputFormats.Get "RSS" }} + +{{ end }} + + +{{ with .OutputFormats.Get "json" }} + +{{ end }} + + +{{ partial "extended_head.html" . }} diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: /