【问题标题】:Cookie Consent pop up not showing up on Astro.js ProjectCookie 同意弹出窗口未显示在 Astro.js 项目中
【发布时间】:2023-02-21 23:48:41
【问题描述】:

Cookie Consent 没有出现在我的网站上:https://mytopcountries.web.app/

`

document.addEventListener('DOMContentLoaded', function () { cookieconsent.run({"notice_banner_type":"simple","consent_type":"express","palette":"light","language":"en","page_load_consent_levels":["strictly-necessary"]," notice_banner_reject_button_hide":false,"preferences_center_close_button_hide":false,"page_refresh_confirmation_buttons":false,"website_name":"uspekhi","website_privacy_policy_url":"https://uspekhi.web.app/"}); });

TermsFeed Policy Generator 提供的免费 cookie 同意管理工具

`

我在公共文件夹中创建了一个 index.html 文件

我已经在 Firebase 上部署了网站,并通过 TermsFeed https://www.TermsFeed.com 添加了 Cookie Consent 在 public 文件夹中的 index.html 上,但是它不会在实时页面上弹出:https://mytopcountries.web.app/

【问题讨论】:

    标签: astrojs cookieconsent


    【解决方案1】:

    您不应将 index.html 放入 /public 文件夹中。它适用于您的非代码、未处理的资产(字体、图标等)。

    Astro 使用/src 文件夹来存放项目文件。

    文档:https://docs.astro.build/en/core-concepts/project-structure/

    【讨论】:

      猜你喜欢
      • 2012-04-17
      • 2021-03-03
      • 2015-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多