Add link previews (Open Graph tags) for shared pages

未关闭 适合新手
#39 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
80/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
html
领域
frontend

调研方向

从 templates/base.html 开始:添加一个空的 {% block meta %} 到 <head> 内,带有默认的 description、og:title、og:description、og:image 和 twitter:card 标签。然后在 templates/game.html 中覆盖该块,使用 game 对象的 title、description 和 cover image 字段,现有的页面模板已经渲染这些字段。完成意味着游戏页面渲染出的 HTML 带有该游戏专属的标签——通过查看源代码或将链接交给预览检查器来确认。

由索引模型根据 Issue 内容生成。

描述

frontend good first issue

When someone shares a GameVault link on LinkedIn, WhatsApp or Discord, it should show a title, description and image.

  • Add a {% block meta %} to templates/base.html with a default description, og:title, og:description, og:image and twitter:card
  • Override it in templates/game.html with the game's title, description and cover image
  • Test it with a link preview checker, or by sharing a link to yourself
主要语言
CSS
星标
1
派生
1
平均合并
39 分钟
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NotADIM2/GameVault 的其他 Issue

查看 NotADIM2/GameVault 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。