Obsah
Hugo
Šablony
https://themes.gohugo.io/theme/agency/
https://github.com/digitalcraftsman/hugo-agency-theme/issues
https://themes.gohugo.io/hugo-universal-theme/
Testovací stránky - /home/username/test - obecně může být složka kdekoliv.
http://81.2.210.7:1313/
Spuštění hugo serveru
Parametry:
https://gohugo.io/commands/hugo_server/
cd hugosite hugo server --baseURL=http://81.2.210.7:1313 --bind=10.115.144.55 hugo server --baseURL=http://81.2.210.106:1313 --bind=10.13.238.59 --disableFastRender
https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-victor-hugo-on-netlify/
https://www.tengio.com/blog/company-website-using-hugo/
https://georgecushen.com/create-your-website-with-hugo/
https://xiaoyunyang.github.io/post/using-hugo-to-build-a-personal-brand-website/
Vytvoření nového webu
Základní konfigurace: config.toml
Setting Up a Static Site with Hugo and Push to Deploy
https://jtreminio.com/blog/setting-up-a-static-site-with-hugo-and-push-to-deploy/
http://anthonyfok.org/post/getting-started-with-hugo/
cd /work/web/example.org hugo && cp -a public/* /var/www/example.org/
HUGO WYSIWYG
HUGO FORM - Formspree
Je nutná bezplatná registrace.
https://formspree.io/forms/mayazzge/integration
Při použití Airspace tématu jsem musel upravit soubor Project\themes\airspace-hugo\layouts\_default\contact.html
Jeden řádek zakomentovat, druhý přidat.
Na základě registrace je vygenerováno ID mayazzge na základě kterého se odesílají data z formuláře na uvedenou adresu. V tomto konkrétním případě na adresu nemec@emcc.cz
- contact.html
<!--<form method="POST" {{ if .use_netlify }}name="{{ printf "contact_%s" $.Language.Lang }}" action="{{ "/message_sent" | relLangURL }}" netlify netlify-honeypot="nhp"{{ else }}name="contact" action="{{ .action | safeURL }}"{{ end }}>--> <form action="https://formspree.io/f/mayazzge" method="POST">
Google mapy
Nepodařilo se mi zprovoznit Google mapu v kontaktech pomocí Google Maps API key
https://developers.google.com/maps/documentation/javascript/get-api-key
https://github.com/devcows/hugo-universal-theme/issues/68
Nakonec jsem zakomentoval řádky v souboru config.toml
#googleMapsApiKey = "AIzaSyCJwXn_a1Px-2xxxxxIY7cbxxxxoxx" #latitude = "50.1430750" #longitude = "14.5174881" #direction = "Beranových 823, Praha 9 - Letňany"
A pak jsem postupoval podle návodu:
I find a simple solution to add Google Map without map API key, latitude and longitude. Just go to maps.google.com and search your location. Then you can click share, embed map, and find some html codes . Finally you can paste the html codes into your contact.md.
- contact.md
+++ title = "Kontakt" id = "contact" weight = 70 autolink = true +++ <iframe src="https://www.google.com/maps/embed?pb=!1m23!1m12!1m3!1d5113.911962238951!2d14.513889227995051!3d50.143255317736525!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m8!3e6!4m0!4m5!1s0x470bed989e6b2b0f%3A0xba2ba726476c6781!2sBeranov%C3%BDch+823%2C+199+00+Praha+18!3m2!1d50.1432554!2d14.518266599999999!5e0!3m2!1scs!2scz!4v1549957346022" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe> # Jak Vám můžeme pomoci? Pošlete nám Váš dotaz. Pokusíme se na něj odpovědět v co nejkratší době.
Vložení vlastního js nebo css kódu
Ve složce themes/hugo-universal-theme/layouts/partials
Např. skript pro retargeting od seznamu byl přidán do souboru scripts.html
