const_url 中的永久链接
Permalink in const_url
在我的 config file
中,我基本上有 permalink: :inLink/:title/
这使得以下成为可能:
https://example.com/hello/post-1
(=一切顺利!)
因此,inLink = hello
在我的降价文件中。
现在我也有这条线……
const post_url = config.get('page_url').replace('%SLUG%', event.slug)+'#comment-'+event.id;
这呈现:
https://example.com/post-1
(=不好!)
所以inLink permalink variable hello
从这里消失了。
现在的问题是 how/where 在此行中添加 inLink variable
...
const post_url = config.get('page_url').replace('%SLUG%', event.slug)+'#comment-'+event.id;
???
在 Ghost 文档中,它指定 page_url
为
Helper - Output the URL for a given page in a list (i.e. next page)
This helper is used in the pagination template required by the {{pagination}} helper to output the URL for the next, previous or a specific page. It expects a variable which contains the page number you want to output.
The helper can also interpret the strings "next" and "prev", to display a next/previous link outside of the context of pagination.
我想你想要 url,可能是绝对 URL
类似于:
"{{url absolute="true"}}"
在我的 config file
中,我基本上有 permalink: :inLink/:title/
这使得以下成为可能:
https://example.com/hello/post-1
(=一切顺利!)
因此,inLink = hello
在我的降价文件中。
现在我也有这条线……
const post_url = config.get('page_url').replace('%SLUG%', event.slug)+'#comment-'+event.id;
这呈现:
https://example.com/post-1
(=不好!)
所以inLink permalink variable hello
从这里消失了。
现在的问题是 how/where 在此行中添加 inLink variable
...
const post_url = config.get('page_url').replace('%SLUG%', event.slug)+'#comment-'+event.id;
???
在 Ghost 文档中,它指定 page_url
为
Helper - Output the URL for a given page in a list (i.e. next page) This helper is used in the pagination template required by the {{pagination}} helper to output the URL for the next, previous or a specific page. It expects a variable which contains the page number you want to output.
The helper can also interpret the strings "next" and "prev", to display a next/previous link outside of the context of pagination.
我想你想要 url,可能是绝对 URL
类似于:
"{{url absolute="true"}}"