From a64315e865cdee66b7be6679baf310e84f49fef5 Mon Sep 17 00:00:00 2001 From: kurets Date: Wed, 4 Jan 2023 23:09:59 +0200 Subject: [PATCH] added meta descriptions - im a fucking godHolyShit new blog post with explanation of how to add meta description --- new-site/config.toml | 9 +-- new-site/content/_index.md | 1 + .../content/blog/meta-description-in-hugo.md | 53 +++++++++++++++ new-site/content/blog/yoinked-css.md | 1 + new-site/public/blog/index.html | 3 +- new-site/public/blog/index.xml | 41 +++++++++++- .../blog/meta-description-in-hugo/index.html | 67 +++++++++++++++++++ .../multiple-index-pages-in-hugo/index.html | 3 +- .../blog/pluralization-issues/index.html | 2 +- new-site/public/blog/yoinked-css/index.html | 2 +- new-site/public/categories/index.html | 2 +- new-site/public/categories/index.xml | 39 +++++++++++ .../00-00-hackbookeasypeasy/index.html | 2 +- .../public/hackbook/01-01-preface/index.html | 2 +- .../public/hackbook/01-02-warning/index.html | 2 +- .../public/hackbook/01-03-fear/index.html | 2 +- .../hackbook/02-01-introduction/index.html | 2 +- .../hackbook/02-02-sister-kenny/index.html | 2 +- .../index.html | 2 +- .../hackbook/03-02-the-easy-method/index.html | 2 +- .../index.html | 2 +- .../03-04-the-sinister-trap/index.html | 2 +- .../index.html | 2 +- .../hackbook/03-06-internet-porn/index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../public/hackbook/03-09-stress/index.html | 2 +- .../public/hackbook/03-10-boredom/index.html | 2 +- .../hackbook/03-11-concentration/index.html | 2 +- .../hackbook/03-12-relaxation/index.html | 2 +- .../03-13-social-night-pmoing/index.html | 2 +- .../03-14-what-am-i-giving-up/index.html | 2 +- .../03-15-self-imposed-slavery/index.html | 2 +- .../index.html | 2 +- .../public/hackbook/03-17-health/index.html | 2 +- .../public/hackbook/03-18-energy/index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../03-22-beware-of-cutting-down/index.html | 2 +- .../hackbook/03-23-just-one-peek/index.html | 2 +- .../index.html | 2 +- .../03-25-the-youtube-pmoer/index.html | 2 +- .../hackbook/03-26-a-social-habit/index.html | 2 +- .../public/hackbook/03-27-timing/index.html | 2 +- .../03-28-will-i-miss-the-fun/index.html | 2 +- .../03-29-can-i-compartmentalize/index.html | 2 +- .../03-30-avoid-false-incentives/index.html | 2 +- .../03-31-the-easy-way-to-stop/index.html | 2 +- .../03-32-the-withdrawal-period/index.html | 2 +- .../hackbook/03-33-just-one-peek/index.html | 2 +- .../03-34-will-it-be-harder-for-me/index.html | 2 +- .../index.html | 2 +- .../hackbook/03-36-substitutes/index.html | 2 +- .../index.html | 2 +- .../03-38-the-moment-of-revelation/index.html | 2 +- .../hackbook/03-39-the-final-visit/index.html | 2 +- .../hackbook/03-40-a-final-warning/index.html | 2 +- .../public/hackbook/03-41-feedback/index.html | 2 +- .../index.html | 2 +- .../03-43-advice-to-non-pmoers/index.html | 2 +- .../03-44-should-i-tell-my-so/index.html | 2 +- .../04-01-the-instructions/index.html | 2 +- .../04-02-rebt-coping-statements/index.html | 2 +- .../hackbook/05-01-scripts-01/index.html | 2 +- .../hackbook/05-01-scripts-02/index.html | 2 +- .../hackbook/05-01-scripts-03/index.html | 2 +- .../hackbook/05-01-scripts-04/index.html | 2 +- .../hackbook/05-01-scripts-05/index.html | 2 +- new-site/public/hackbook/fin/index.html | 2 +- new-site/public/hackbook/index.html | 2 +- new-site/public/hackbook/index.xml | 39 +++++++++++ new-site/public/helloworld/index.html | 2 +- new-site/public/index.html | 2 +- new-site/public/index.xml | 41 +++++++++++- new-site/public/sitemap.xml | 13 ++-- new-site/public/tags/blog/index.html | 3 +- new-site/public/tags/blog/index.xml | 41 +++++++++++- new-site/public/tags/index.html | 4 +- new-site/public/tags/index.xml | 41 +++++++++++- new-site/public/tags/updates/index.html | 2 +- new-site/public/tags/updates/index.xml | 39 +++++++++++ .../themes/lugo/layouts/_default/baseof.html | 2 +- 83 files changed, 486 insertions(+), 84 deletions(-) create mode 100644 new-site/content/blog/meta-description-in-hugo.md create mode 100644 new-site/public/blog/meta-description-in-hugo/index.html diff --git a/new-site/config.toml b/new-site/config.toml index de5450f7..460d8934 100644 --- a/new-site/config.toml +++ b/new-site/config.toml @@ -5,10 +5,11 @@ theme = 'lugo' pluralizelisttitles = false [params] -showrss = true -nextprev = true -taglist = true -datesinlist = true + description = "A blog about the things I'm interested in - Japanese and posting obscure problems I've solved. Will post my takes on 神ゲー vinnies" + showrss = true + nextprev = true + taglist = true + datesinlist = true [markup] [markup.goldmark] diff --git a/new-site/content/_index.md b/new-site/content/_index.md index d0e23f6b..e54c38e4 100644 --- a/new-site/content/_index.md +++ b/new-site/content/_index.md @@ -1,4 +1,5 @@ --- +description: "A blog about the things I'm interested in - Japanese and posting obscure problems I've solved." --- {{% center %}} # VODORASLO diff --git a/new-site/content/blog/meta-description-in-hugo.md b/new-site/content/blog/meta-description-in-hugo.md new file mode 100644 index 00000000..d52c21c5 --- /dev/null +++ b/new-site/content/blog/meta-description-in-hugo.md @@ -0,0 +1,53 @@ +--- +title: "Meta Description in Hugo" +date: 2023-01-04T22:52:24+02:00 +draft: false +description: "This step by step guide will show you how to add meta description in your own Hugo site." +tags: ['blog'] +--- + +# Adding meta description in Hugo + +I assume you are using Luke Smith's theme - Lugo, if you are not, you'd have to find these files yourself (e.g. search using vscode). + +## Setting a global meta description + + +1. Locate your config.toml or config.yaml file +2. Add the following line inside it + +For config.toml +```toml +[params] + description = "The global meta description of your website" +``` + +For config.yaml +```yaml +params: + description: The global meta description of your website +``` + +It won't work just yet because you have update the ```baseof.html``` file. + +## Updating the baseof.html file + +1. Locate baseof.html +2. Add or change the meta description line with the following +```html + +``` + +And now if you start your Hugo server locally with ```hugo serve --noHTTPCache``` and you right click on your page -> View Page Source -> Search for the meta description tag. It should match what you left in the config file. + +## Replacing the global description with a custom one + +1. Have a markdown file ready +2. In the preamble, add +```yaml +--- +description: "Your custom description for this page" +--- +``` + +Following these steps would guarantee that you have a meta description for everypage with the ability for creating a custom one whenever you need it! \ No newline at end of file diff --git a/new-site/content/blog/yoinked-css.md b/new-site/content/blog/yoinked-css.md index aa9546e5..6e72766e 100644 --- a/new-site/content/blog/yoinked-css.md +++ b/new-site/content/blog/yoinked-css.md @@ -3,6 +3,7 @@ title: "Yoinked some Css and updated the site" date: 2022-12-27T14:24:24+02:00 draft: false tags: ['updates'] +description: "A tale as old as time - stealing css" --- yoinked lukes css and updated the site, its basically his colors for the headers and my cyan anchor links.. very pretty much wow \ No newline at end of file diff --git a/new-site/public/blog/index.html b/new-site/public/blog/index.html index d131982c..f06a8574 100644 --- a/new-site/public/blog/index.html +++ b/new-site/public/blog/index.html @@ -6,7 +6,7 @@ - + @@ -17,6 +17,7 @@