gpt4 book ai didi

html - 如何将自定义内容添加到新的 Google 协作平台

转载 作者:行者123 更新时间:2023-11-27 23:20:34 25 4
gpt4 key购买 nike

我希望能够将由我自己的服务器提供的内容添加到新(2016 年 12 月)Google 协作平台网站上的页面。我能看到的添加自定义内容的唯一方法是右侧边栏中的“插入 > 嵌入 URL”选项。

我已请求 Google G-Suite 人员的支持,但除了建议我使用 OpenGraph 标记外,他们提供的信息很少。

如果我添加一个带有标记有“og”元标记的图像的链接,图像就会显示,这是进步,但我想显示其他内容,即我自己的服务器提供的一些 html。

我看到新站点在幕后使用了一个 Polymer 版本 - 在嵌入式链接中提供 Polymer Web 组件对我来说是理想的选择,但我无法做到这一点。

有什么想法吗?

最佳答案

您现在可以为此使用 Google Apps 脚本。

我不确切知道您要嵌入什么,但一个简单的实现是使用 gs 文件和 html 文件创建一个 google apps 脚本项目。

//my-gs-file.gs
function doGet(e) {
return HtmlService
.createTemplateFromFile('my-html-file')
.evaluate();
}
<!-- my-html-file.html-->
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<p>Hello world</p>
</body>
</html>

您可以为 gsuite 内容使用 javascript(有一些限制)和 google apps 脚本 https://developers.google.com/apps-script/reference/calendar/ , 外部 API https://developers.google.com/apps-script/guides/services/external

这也值得一读https://developers.google.com/apps-script/guides/html/best-practices

我应该补充一点,这个例子假设你将继续使用 scriptlets 等开发 html 模板,但如果它只是纯 html,那么 gs 文件只需要包含行

return HtmlService.createHtmlOutputFromFile('my-html-file')

关于html - 如何将自定义内容添加到新的 Google 协作平台,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41320699/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com