Skip to main content
Skip table of contents

Insert Code from Git

Embed non‑markdown files such as code, config, markup, or plain text from your repositories.

image-20251103-101349.png

Before you start

  • Connect your Git account and ensure access to the target repo/branch.

Examples of supported file types

  • Code: .js, .ts, .tsx, .py, .java, .c, .cpp, .cs, .go, .rs, .rb, .php, .swift, .kt, .scala, .sh, .bash, .zsh, .sql, .r, .m, .pl, .lua, .dart, .vue

  • Config/Data: .json, .yaml, .yml, .toml, .ini, .cfg, .conf, .env

  • Markup/Styles: .html, .htm, .xml, .svg, .css, .scss, .sass, .less

  • Plain text: files without a known extension are shown as text when possible

Not supported for inline preview (you can still reference them): .pdf, .doc(x), .xls(x), .ppt(x), archives like .zip, .tar, .gz, .bz2, .7z, .rar, executables/installers like .exe, .dll, .dmg, .pkg, .iso, and .wasm.

Insert steps

  1. Choose Insert Other Files from Git.

  2. Connect/select your account and pick the repository and branch.

  3. Browse to the file and select it.

  4. (Optional) Set the title and toggle any available display options (e.g., line numbers where applicable).

  5. Insert to embed the file.

How it renders

  • Recognized languages are syntax-highlighted for readability.

  • Large files or very long lines may be truncated for performance.

Permissions

  • Viewers need their own access to the repository to see the embedded content.

Troubleshooting

  • File doesn’t preview: Verify the extension is supported for inline view or download/reference it instead.

  • Missing file: Confirm branch selection and path accuracy.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.