Closed ghost closed 4 years ago
Ok, this makes sense. I'll add all of them. But
when you type / (keyboard shortcut) , your cursor quickly into search bar.
I don't want to set a global key down event for the search. You do make a custom js file if you want the feature.
Ok, this makes sense. I'll add all of them. But
when you type / (keyboard shortcut) , your cursor quickly into search bar.
I don't want to set a global key down event for the search. You do make a custom js file if you want the feature.
Okay #154
website host on netlify.com , which needs custom netlify.toml file, example blew
use 301 URL redirection ,thus, i could use my own domain instead of second-level domain of netlify.com changing https://zzodocs.netlify.com/
to https://zzodocs.com
301 moved permanently (redirects permanently from one URL to another passing link equity to the redirected page)
[build]
command = "hugo --gc --minify -b $URL"
publish = "public"
[build.environment]
HUGO_VERSION = "0.62.0"
HUGO_ENABLEGITINFO = "true"
[context.production.environment]
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[[headers]]
for = "*.webmanifest"
[headers.values]
Content-Type = "application/manifest+json; charset=UTF-8"
[[headers]]
for = "index.xml"
[headers.values]
Content-Type = "application/rss+xml"
[[redirects]]
from = "https://zzo.netlify.com/*"
to = "https://zzo.com/:splat"
status = 301
force = true
# query = {path = ":path"}
# conditions = {Language = ["en"], Country = ["US"], Role = ["admin"]}
Netlify is not part of this project. But did you mean that I should make documentation on how to host a site using Netlify? It's documented here https://gohugo.io/hosting-and-deployment/hosting-on-netlify/#readout
@LGTMXD
I have a question.
What's the benefit of adding Algolia?
I just found that Algolia uses the instantsearch.js
library and It's almost the same with the current search engine in the zzo theme. It adds complexity.
Since I don't want to manage the two search engines, I want you to explain the benefit of the Algolia. Why are you not satisfying the current search? How about I improve the current search instead of adding Algolia?
Regarding Google Adsense, you have to override the layouts
folder to control the ads.
For example, make this file to your partials folder.
{{ if and (not .Site.IsServer) (not ($.Param "disableAdsense")) }}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins
class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-xxxxxx"
data-ad-slot="xxxxx"
>
</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{{ end }}
And then, insert this partial by overriding theme's layout folder.(so to speak, make your layout folder at your root directory and copy files from the theme's directory. that is the override) I don't think this doesn't have to be part of the theme. The user has to add it. I'll wait for your feedback. You can just type Chinese.
And I'm not currently using a cookie in the theme. What are you going to do with the cookies? Are you going to use a cookie? How? Why?
没有原因,就是想用。
You can add google tag manager by setting googleTagManager
parameter
...
googleTagManager = "" #GTM-XXXXXX
You can also add links to the footer by setting the below parameter
...
[[footerLinks]]
name = "privacy"
link = "https://..."
[[footerLinks]]
name = ""
link = ""
I add 1,4 of your request. Regarding option2, you have to set it by your self. option3, I'm not going to add redundant search logic option5, we are not using cookies so we don't need the component.
So, I'm closing this issue now
1. Support Google Tag manager (like Google Analytics)
2. support Google Adsense
paste code between
</head>
, then put ads.txt to your website root directory3. Search Part
Option 1: Support third-party search engine :Algolia search
Option 2: Support buid-in search engine
4. Add Terms and Privacy in footer,
5. Add Privacy pack :Show a cookie consent message to visitors