Skip to content
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

Embed schnack inside iframe for Hugo AMP site #138

Open
roshanjonah opened this issue Jun 16, 2021 · 0 comments
Open

Embed schnack inside iframe for Hugo AMP site #138

roshanjonah opened this issue Jun 16, 2021 · 0 comments

Comments

@roshanjonah
Copy link

Trying to embed Schnack into a Hugo site that is using AMP. As you know with AMP, the only possibility of embedding comments is via iframes. Currently, I am using Disqus and my iframe code looks something like this...

{{ with .Params.Author }}
    <amp-iframe width=600 height=180
        layout="responsive"
        sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms"
        resizable
        src="{{ $.Site.Params.commentsEmbedUrl }}?id={{ .File.UniqueID }}&url={{ .Permalink }}">
        <div overflow
            tabindex=0
            role=button
            aria-label="Load more"
            style="display:block;font-size:14px;font-weight:500;text-align:center;line-height:1.1;padding:12px 16px;border-radius:4px;background:rgba(29,47,58,0.6);color:rgb(255,255,255)">
            Load more
        </div>
    </amp-iframe>
{{ end }}

?id={{ .File.UniqueID }}&url={{ .Permalink }} - Both these are populated. How do I do something like this for Schnack? Does it support iframes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant