Embed “Publish to ABMLib” Button

Add a one-click publish button to your README, docs site, or any webpage.

How It Works

  1. Add a <script> tag to your page with the URL of your DSL file.
  2. The script renders a branded “Publish to ABMLib” button.
  3. When clicked, it opens the ABMLib publish page with your DSL pre-loaded, ready for the user to review, add metadata, and publish.

HTML Snippet

Copy the snippet below and replace the data-dsl-url value with the URL of your DSL JSON file.

<script
  src="https://abmlib.dev/embed/publish-button.js"
  data-dsl-url="https://example.com/my-blueprint.json"
></script>

Configuration

AttributeRequiredDescription
data-dsl-urlYesThe publicly accessible URL of your DSL JSON file. The publish page will fetch this URL client-side, so the remote server must allow cross-origin requests (CORS).

Preview

This is how the button will appear on your page:

CORS Requirements

When a user clicks the button, the ABMLib publish page fetches the DSL from your URL using a client-side fetch() request. The remote server hosting the DSL file must respond with an Access-Control-Allow-Origin header that permits requests from https://abmlib.dev. If the remote server does not support CORS, the user will see an error and can paste the DSL manually instead.