carrotsearch / gatsby-theme-apidocs

An opinionated Gatsby theme for writing technical documentation.
https://carrotsearch.github.io/apidocs/
2 stars 0 forks source link

Using the <embed> tag to embed preformatted content #6

Closed stanislawosinski closed 1 year ago

stanislawosinski commented 2 years ago

Currently, we use the <pre data-embed="path" /> tag. The downside is that the IDEs won't check or autocomplete the paths to the file being embedded.

If we used the <embed> tag, we'd get path autocompletion:

<figure>
  <embed data="./path/code.js"></embed>
</figure>