Embed Google docs in GitLab markdown file

Viewed 2398

I want to embed Google docs - and possibly Google sheets - in a GitLab markdown file. GitLab's markdown guide lists the following steps to do this:

  • open your Google document
  • click File -> Publish to the web
  • choose Embed
  • click on Publish and copy the <iframe>
  • go to your markdown file and wrap the iframe into a <figure> tag with the responsive video_container class like in this example:
<figure class="video_container">
<iframe src="https://docs.google.com/spreadsheets/d/1jAnvYpRmNu8BISIrkYGTLolOTmlCoKLbuHVWzCXJSY4/pubhtml?widget=true&amp;headers=false"></iframe>
</figure>

Unfortunately this does not work for me. Instead of the embedded document I only see whitespace.

1 Answers

this guide or this one are refering to Kramdown which is a Markdown converter used by https://about.gitlab.com:

For about.GitLab.com we use kramdown, which is an advanced Markdown engine with a lot of interesting features that most of the other engines don't have, such as inline attribute lists (IALs), which enable easy styling beyond the standard Markdown options.

This guide was dedicated mainly for building static website by rendering markdown using kramdown (essentially for writing blog post) :

This guide has been made to make it easier for everyone to use kramdown features and save a lot of time writing content for about.GitLab.com, including handbook pages, website pages, blog posts and everything else within the project www-GitLab-com.

Gitlab.com, Gitlab CE and Gitlab EE uses Github Flavored Markdown, an extension of common mark :

In most of GitLab text areas you'll find markdown support. Not all of them run with kramdown, so the markup will not behave equally "GitLabwide". For GitLab.com, GitLab CE and GitLab EE text areas, the markdown engine is currently CommonMarker. Here you can find the markdown style guide for them.

If you are interesting in rendering Markdown in Gitlab file (eg Readme, etc...), the Markdown guide is https://docs.gitlab.com/ee/user/markdown.html

Embedding Google sheet in GitLab Flavored Markdown is not possible, unless you want to just include a picture of it or if you want to copy/paste the spreadsheet content to markdown format

Related