我正在尝试订购菜单中的项目,但这对我不起作用。我试图按照他们的文档进行操作,但它根本不起作用。
在我的标题中:
{{ range .Site.Data.Menu }}
<li>
<a href="{{ .URL | absURL }}"
{{ if and ( isset . "Title" ) ( ne .Title "" ) }} title="{{ .Title }}"{{ end }}>
{{ if and ( isset . "IconClass" ) ( ne .IconClass "" ) }}
<i class="fa {{ .IconClass }}"></i>
{{ end }}
{{ .Name }}
</a>
</li>
{{ end }}
Run Code Online (Sandbox Code Playgroud)
菜单文件
[home]
Name = "Home"
Title = "Home"
URL = "/home"
weight = 1
[apparatus]
Name = "Apparatus" …Run Code Online (Sandbox Code Playgroud) 我正在尝试根据用于连接到我的服务器的 url 动态读取 SSL 证书的位置。我尝试了几种不同的方法,但似乎都不起作用。目前我的配置如下所示
UseCanonicalName Off
listen 443
<VirtualHost *:443>
ServerName example
ServerAlias *
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/%0/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/%0/privkey.pem
VirtualDocumentRoot /var/www/vhosts/%-2/%-3+/public
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
这里的问题是,当我启动 apache 时,出现错误,提示找不到 ssl 证书的文件位置,该证书声明“/etc/letsencrypt/live/%0/cert.pem”
所以看起来 %0 没有被 url 替换。
编辑:当我手动仅用 url 替换 %0 时,则表示 url 具有有效的 SSL