Add rel="amphtml" to head - any tips?

I don’t like the way the administrator is discussing the issue, I see him abusing his authority.
This is my personal opinion anyway, I have no intention of changing this source code.

I want to implement AMP for my discourse!

I have created a template with url like: amp.domain.com/blog/123456
example: https://voucher.com.vn/dev/blog/846 or https://voucher.com.vn/dev/blog/844

only mobile: https://www.google.com/amp/s/go.thuvienmuasam.com/amp/t/846

And now I’m looking for a way to insert the above url into the to declare the AMP page.

example: <head> ... <link rel="amphtml" href="https://voucher.com.vn/dev/blog/846"> ... </head>

Can someone help me with how to do it?

1 Like

Why? AMP isn’t really compatible with JavaScript apps like discourse. Amp is for relatively static news and blog web pages, not apps.

1 Like

Because the page was created to create news articles, blogs.
Should optimize the load as well as search results is an optimal choice.

1 Like

I am afraid that would require completely rewriting Discourse from scratch, as in making it no longer a JavaScript app — if you really need amp that badly, choose a different free open source software.