-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slack %SLUG% #78
Comments
So the idea behind the slug was that you use the part of your blog post urls that is different for every post. let's say your blog urls look like this: https://mysite.com/blog/2018-11/this-is-a-post.html then the url schema can be described as:
and the slugs would be in this scenario you'd set the {
"page_url": "https://mysite.com/blog/%SLUG%.html"
} and it should all work with slack. |
closing this for now |
There is more to this. The "/" in the slug causes a problem. See:
To solve this I had to escape the "/" in the form of "post%2Fslug" and configure my webserver to allow escaped slashes so that:
|
slack.js:
const post_url = config.get('page_url').replace('%SLUG%', event.slug)+'#comment-'+event.id;
page_url:
"page_url": "https://example.com/%SLUG%",
In blogpost:
This all works.
But I need output following:
title/slug
and NOTtitle+++++slug
If I do
.join('/')
then schnack does not work at all, it fully crashes. I need the slash/
as separator betweentitle
andslug
.How to fix?
The text was updated successfully, but these errors were encountered: