I am using Ghost 2.4.0. And I was wondering is there anyway to output the query url in generated HTML?
Say, user opens http://localhost:2368/welcome?query=something and I want to get the exact same request URL and output it back to the user. In this case, I don’t need any kind of cache.
To be more specific, we want our Ghost blog to accommodate WeChat’s (the biggest social network in China and also a pain in the ass platform for developers) authentication method, which requires current URL as part of the hash string.
There’s a GitHub issue which I found describing the same need: query parameters in a custom handlebars helper. · Issue #5957 · TryGhost/Ghost · GitHub
[update on 18 Dec 2018]: For internet’s sake, I ended up using Ghost in development mode, which I assumed doesn’t cache anything. And then I added one line (res.locals.wechatUrl = req.originalUrl) in themes/middleware.js and went on to write my own helper.