Home Entertainment Show HN: Embed a real Linux terminal on your website
Entertainment

Show HN: Embed a real Linux terminal on your website

Key Points

Embed sandbox.bio Add a live terminal to your website or blog post You can embed a sandbox.bio terminal directly on your website or blog post. Simply add this script tag to your page: If you use GitHub Pages, any Markdown code blocks you mark as ```bash will have a "Run" button that executes directly in the embedded terminal. For HTML websites, any with the class "language-bash" will get a "Run" button.

Embed sandbox.bio Add a live terminal to your website or blog post You can embed a sandbox.bio terminal directly on your website or blog post. Simply add this script tag to your page: If you use GitHub Pages, any Markdown code blocks you mark as ```bash will have a "Run" button that executes directly in the embedded terminal. For HTML websites, any with the class "language-bash" will get a "Run" button. You can also customize the embedded terminal by adding attributes to the script tag: data-cwd="folder-name" : the starting working directory in the terminaldata-config="https://yourwebsite.com/config.json" : an optional remote config URL, using the same format as thesandboxbio.config.json file used by the GitHub integration. This file can be hosted on GitHub Pages too. If you need to preload files in the terminal, you can use the array files inside your config, and specify the URLs to where each file lives: { tools: [ { "url": "https://.github.io//data/example.bam", "path": "example.bam" } ] }
Linux (ORG) GitHub (ORG) GitHub Pages (ORG)
Originally published by Hacker News Read original →