Skip to content

Commit

Permalink
feat: add Bilibili shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
gcushen committed Oct 22, 2023
1 parent 24a7641 commit 110377e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 20 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

🎨 **2. Personalize** a beautiful starter template with **50+ light/dark color themes, language packs, and blocks**

🛋 **3. Optionally, write from your sofa or on the go with the integrated open source Content Management System (CMS) based on [Netlify CMS](https://wowchemy.com/docs/getting-started/hugo-cms/)**
🛋 **3. Optionally, write from your sofa or on the go with the integrated open source Content Management System (CMS) based on [Decap CMS](https://university.wowchemy.com/getting-started/cms/decap/)**

<p style="text-align: center"><a href="https://wowchemy.com/templates/" target="_blank" rel="noopener"><img src="./.github/media/write-from-phone.gif" alt="Wowchemy CMS"></a></p>

[Check out the latest **demos**](https://wowchemy.com/templates/) of what you'll get in less than 60 seconds, or [get **inspired**](https://wowchemy.com/creators/) by other creators.

- 👉 [**Get Started**](https://wowchemy.com/templates/)
- 📚 [View the **documentation**](https://wowchemy.com/docs/)
- 📚 [View the **documentation**](https://university.wowchemy.com/)
- 🙋‍♀️ **Have a question?**
- **Chat with us now on [Discord](https://discord.gg/z8wNYzb)** or explore the [Troubleshooting Guide]() and [Q&A Forum](https://github.com/wowchemy/wowchemy-hugo-themes/discussions)
- **Chat with us now on [Discord](https://discord.gg/z8wNYzb)** or explore the [Troubleshooting Guide](https://university.wowchemy.com/reference/troubleshooting/) and [Q&A Forum](https://github.com/wowchemy/wowchemy-hugo-themes/discussions)
- _Also, check out [Hugo Forum](https://discourse.gohugo.io) for Hugo Qs and [Netlify Forum](https://answers.netlify.com/) for Netlify Qs_
- 🐦 Share your Wowchemy site with the community on Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%23MadeWithWowchemy&src=typed_query)
- 🗳 [Take the survey and help us improve #OpenSource](https://forms.gle/NioD9VhUg7PNmdCAA)
- ⬆️ **Updating?** View the [Update Guide](https://wowchemy.com/docs/hugo-tutorials/update/) and [Release Notes](https://github.com/wowchemy/wowchemy-hugo-themes/releases)
- ⬆️ **Updating?** View the [Update Guide](https://university.wowchemy.com/reference/update/) and [Release Notes](https://github.com/wowchemy/wowchemy-hugo-themes/releases)
- 🚀 [Contribute improvements](CONTRIBUTING.md) or [suggest improvements](https://github.com/wowchemy/wowchemy-hugo-themes/issues)

## 💙 We ask you, humbly, to support this open source movement
Expand Down Expand Up @@ -61,7 +61,7 @@ Choose from one of the starter templates to easily get started:

## The Future of Technical Content Writing

**Write rich, future-proof content** using standardized Markdown along with bundled extensions for math and diagrams. Edit in the open source CMS or via an editor such as the online GitHub Editor, Jupyter Notebook, or RStudio! [Learn more](https://wowchemy.com/docs/content/writing-markdown-latex/)
**Write rich, future-proof content** using standardized Markdown along with bundled extensions for math and diagrams. Edit in the open source CMS or via an editor such as the online GitHub Editor, Jupyter Notebook, or RStudio! [Learn more](https://university.wowchemy.com/reference/markdown/)

[![Writing technical content](https://wowchemy.com/uploads/readmes/writing-technical-content.gif)](https://academic-demo.netlify.app/post/writing-technical-content/)

Expand All @@ -71,11 +71,11 @@ Choose from one of the starter templates to easily get started:

**Key features:**

- **Page builder** - Create _anything_ with [**widgets**](https://wowchemy.com/docs/getting-started/page-builder/) and [**elements**](https://wowchemy.com/docs/content/writing-markdown-latex/)
- **Page builder** - Create _anything_ with [**blocks**](https://university.wowchemy.com/getting-started/page-builder/) and [**elements**](https://university.wowchemy.com/reference/markdown/)
- **Edit any type of content** - Blog posts, publications, talks, slides, projects, and more!
- **Create content** in [**Markdown**](https://wowchemy.com/docs/content/writing-markdown-latex/), [**Jupyter**](https://wowchemy.com/docs/import/jupyter/), or [**RStudio**](https://wowchemy.com/docs/getting-started/install-hugo-extended/)
- **Plugin System** - Fully customizable [**color** and **font themes**](https://wowchemy.com/templates/)
- **Display Code and Math** - Code highlighting and [LaTeX math](https://en.wikibooks.org/wiki/LaTeX/Mathematics) supported
- **Create content** in [**Markdown**](https://university.wowchemy.com/reference/markdown/), [**Jupyter**](https://university.wowchemy.com/getting-started/cms/), or [**RStudio**](https://university.wowchemy.com/getting-started/cms/rstudio/)
- **Plugin System** - Fully customizable [**color** and **font themes**](https://university.wowchemy.com/getting-started/customize/#appearance)
- **Display Code and Math** - Code highlighting and [LaTeX math](https://university.wowchemy.com/reference/markdown/#math) supported
- **Integrations** - [Google Analytics](https://analytics.google.com), [Disqus commenting](https://disqus.com), Maps, Contact Forms, and more!
- **Beautiful Site** - Simple and refreshing one page design
- **Industry-Leading SEO** - Help get your website found on search engines and social media
Expand All @@ -91,7 +91,7 @@ Choose from one of the starter templates to easily get started:

Wowchemy comes with **automatic day (light) and night (dark) mode** built-in. Alternatively, click the moon icon in the top right of one of the [Demos](https://wowchemy.com/templates/) to set your preferred mode!

Choose a stunning theme for your site and [customize it](https://wowchemy.com/docs/getting-started/customization/#custom-theme) to your liking:
Choose a stunning theme for your site and [customize it](https://university.wowchemy.com/getting-started/customize/#custom-theme) to your liking:

[![Themes](./.github/media/themes.png)](https://wowchemy.com/templates/)

Expand Down
20 changes: 10 additions & 10 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

🎨 **2. 个性化**漂亮的起始模板,享有**50+种浅色/深色主题、多语言包和模块**

🛋 **3. 可选地,使用基于 [Netlify CMS](https://wowchemy.com/docs/getting-started/hugo-cms/) 的开源内容管理系统(CMS),随时随地从沙发上或外出写作**
🛋 **3. 可选地,使用基于 [Decap CMS](https://university.wowchemy.com/getting-started/cms/decap/) 的开源内容管理系统(CMS),随时随地从沙发上或外出写作**

<p style="text-align: center"><a href="https://wowchemy.com/templates/" target="_blank" rel="noopener"><img src="./.github/media/write-from-phone.gif" alt="Wowchemy CMS"></a></p>

[查看最新的 **演示**](https://wowchemy.com/templates/),在不到 60 秒内获取您将获得的内容,或者获得其他创作者的 [**灵感**](https://wowchemy.com/creators/)

- 👉 [**开始使用**](https://wowchemy.com/templates/)
- 📚 [查看 **文档**](https://wowchemy.com/docs/)
- 📚 [查看 **文档**](https://university.wowchemy.com/)
- 🙋‍♀️ **有问题吗?**
- **立即在 [Discord](https://discord.gg/z8wNYzb) 上与我们聊天**,或浏览 [故障排除指南]()[问答论坛](https://github.com/wowchemy/wowchemy-hugo-themes/discussions)
- **立即在 [Discord](https://discord.gg/z8wNYzb) 上与我们聊天**,或浏览 [故障排除指南](https://university.wowchemy.com/reference/troubleshooting/)[问答论坛](https://github.com/wowchemy/wowchemy-hugo-themes/discussions)
- _此外,查看 [Hugo 论坛](https://discourse.gohugo.io) 解决 Hugo 相关问题,以及 [Netlify 论坛](https://answers.netlify.com/) 解答 Netlify 相关问题_
- 🐦 与社区共享您的 Wowchemy 网站:[@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%23MadeWithWowchemy&src=typed_query)
- 🗳 [参加调查,帮助我们改进 #开源](https://forms.gle/NioD9VhUg7PNmdCAA)
- ⬆️ **更新?** 查看 [更新指南](https://wowchemy.com/docs/hugo-tutorials/update/)[发布说明](https://github.com/wowchemy/wowchemy-hugo-themes/releases)
- ⬆️ **更新?** 查看 [更新指南](https://university.wowchemy.com/reference/update/)[发布说明](https://github.com/wowchemy/wowchemy-hugo-themes/releases)
- 🚀 [贡献改进](CONTRIBUTING.md)[建议改进](https://github.com/wowchemy/wowchemy-hugo-themes/issues)

## 💙 我们向您恳请支持这个开源运动
Expand Down Expand Up @@ -61,19 +61,19 @@ Wowchemy 是一个使用**小部件**创建_任何_类型网站的**零代码**

## 技术内容撰写的未来

使用标准化的 Markdown 和捆绑的扩展(包括数学和图表)**编写丰富、具备未来性的内容**。可以在开源 CMS 中编辑,也可以通过在线的 GitHub 编辑器、Jupyter Notebook 或 RStudio 进行编辑![了解更多](https://wowchemy.com/docs/content/writing-markdown-latex/)
使用标准化的 Markdown 和捆绑的扩展(包括数学和图表)**编写丰富、具备未来性的内容**。可以在开源 CMS 中编辑,也可以通过在线的 GitHub 编辑器、Jupyter Notebook 或 RStudio 进行编辑![了解更多](https://university.wowchemy.com/reference/markdown/)

[![撰写技术内容](https://wowchemy.com/uploads/readmes/writing-technical-content.gif)](https://academic-demo.netlify.app/post/writing-technical-content/)

## 特点

[![截图](./.github/media/academic.png)](https://wowchemy.com/templates/)

**主要特点:**- **页面构建器** - 使用[小部件](https://wowchemy.com/docs/getting-started/page-builder/)[元素](https://wowchemy.com/docs/content/writing-markdown-latex/)创建_任何东西_
**主要特点:**- **页面构建器** - 使用[小部件](https://university.wowchemy.com/getting-started/page-builder/)[元素](https://university.wowchemy.com/reference/markdown/)创建_任何东西_
- **编辑任何类型的内容** - 博客文章、出版物、演讲、幻灯片、项目等等!
- 使用 [**Markdown**](https://wowchemy.com/docs/content/writing-markdown-latex/)[**Jupyter**](https://wowchemy.com/docs/import/jupyter/)[**RStudio**](https://wowchemy.com/docs/getting-started/install-hugo-extended/) 创建内容
- **插件系统** - 完全可定制的[**颜色****字体主题**](https://wowchemy.com/templates/)
- **显示代码和数学公式** - 支持代码高亮和[LaTeX数学](https://en.wikibooks.org/wiki/LaTeX/Mathematics)
- 使用 [**Markdown**](https://university.wowchemy.com/reference/markdown/)[**Jupyter**](https://university.wowchemy.com/getting-started/cms/)[**RStudio**](https://university.wowchemy.com/getting-started/cms/rstudio/) 创建内容
- **插件系统** - 完全可定制的[**颜色****字体主题**](https://university.wowchemy.com/getting-started/customize/#appearance)
- **显示代码和数学公式** - 支持代码高亮和[LaTeX数学](https://university.wowchemy.com/reference/markdown/#math)
- **集成** - [Google Analytics](https://analytics.google.com)[Disqus评论](https://disqus.com)、地图、联系表单等等!
- **美丽的网站** - 简单清爽的单页设计
- **行业领先的SEO** - 帮助您的网站在搜索引擎和社交媒体上被发现
Expand All @@ -89,7 +89,7 @@ Wowchemy 是一个使用**小部件**创建_任何_类型网站的**零代码**

Wowchemy内置了**自动白天(浅色)和黑夜(暗色)模式**。或者,单击[Demos](https://wowchemy.com/templates/)右上角的月亮图标设置您喜欢的模式!

为您的网站选择一个惊艳的主题,并[自定义它](https://wowchemy.com/docs/getting-started/customization/#custom-theme)以满足您的喜好:
为您的网站选择一个惊艳的主题,并[自定义它](https://university.wowchemy.com/getting-started/customize/#custom-theme)以满足您的喜好:

[![主题](./.github/media/themes.png)](https://wowchemy.com/templates/)

Expand Down
19 changes: 19 additions & 0 deletions modules/wowchemy/assets/scss/wowchemy/components/_shortcode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,22 @@ details p {
.dark details p {
border-left: 1px solid rgba(255, 255, 255, 0.8);
}

// Bilibili Video

.bilibili {
position: relative;
width: 100%;
height: auto;
margin: 1rem auto;
text-align: center;

iframe {
position: absolute;
width: 100%;
height: 100%;
border: none;
left: 0;
top: 0;
}
}
3 changes: 3 additions & 0 deletions modules/wowchemy/layouts/shortcodes/bilibili.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="bilibili">
<iframe src="//player.bilibili.com/player.html?bvid={{ .Get `id` }}&page={{ .Get `p` | default 1 }}" allow="fullscreen"></iframe>
</div>

0 comments on commit 110377e

Please sign in to comment.