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

What does "host" do #1003

Closed
laoergege opened this issue Jan 14, 2023 · 4 comments
Closed

What does "host" do #1003

laoergege opened this issue Jan 14, 2023 · 4 comments

Comments

@laoergege
Copy link

What does "host" do, I've found that without it the iframe height doesn't adapt?

@laymonage
Copy link
Member

What does "host" do

It can be used to use a different giscus server, e.g. if you run a self-hosted instance.

I've found that without it the iframe height doesn't adapt?

What version of the component are you using? That issue should've been fixed recently.

@laoergege
Copy link
Author

I use the v2.2.6 version of @giscus/vue.

I must add host="https://giscus.app" to fix the problem of iframe height.

<template>
  <Giscus
    id="comments"
    repo="laoergege/laoergege-blog"
    repoId="MDEwOlJlcG9zaXRvcnkxMjM4OTQ4MDE="
    categoryId="DIC_kwDOB2J8Ec4CTiA5"
    mapping="specific"
    :term="discussionID"
    strict="0"
    reactions-enabled="1"
    emit-metadata="0"
    input-position="top"
    :theme="compTheme"
    lang="zh-CN"
    loading="lazy"
    host="https://giscus.app"
  />
</template>

@youyinnn
Copy link

Yeah, this confuses me a lot. But the host do fixed the height issue.

@laymonage
Copy link
Member

laymonage commented Jul 1, 2023

Finally found the cause, apparently Vue sets the host to an empty string if you don't specify it, but only on subsequent renders (not the first one).

Should be fixed in v2.3.0, please update and confirm. Thanks!

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

3 participants