openvibers/openvibe.run Commits

Run: the API example renders as a showcase code block (#34)

OP OpenVibers committed 12 Oct 2026 · 05ad41b05c · 1 file, +1 −1

The front page's API example (the `curl` submit) was a bare `<pre class="sc-code">`, which no stylesheet styles. It now renders through `showcase.code()`, a captioned, scrollable code block like every other site's (checked in a screenshot). `site.test.js` passes.

Changes

ddiff --git a/server/web/home.js b/server/web/home.js
iindex 83f3944..3b1ae08 100644
---- a/server/web/home.js
++++ b/server/web/home.js
@@@ -91,7 +91,7 @@ function body() {
],
}) + `<section class="sc-sec" id="api"><h2>The API</h2>
<p class="sc-lede">Jobs are created with a project token from ${'<a href="https://openvibe.services">OpenVibe.Services</a>'} (capability ${code('run.job.submit')}; reading, listing, cancelling and streaming take ${code('run.job.read')}, ${code('run.job.list')}, ${code('run.job.cancel')} and ${code('run.job.stream')}). A job names its runtime class, a pre-registered artifact (a name and one exact version), its input and its limits (wall clock, CPU time, memory):</p>
--<pre class="sc-code">${SUBMIT_EXAMPLE.replace(/&/g, '&amp;').replace(/</g, '&lt;')}</pre>
++</section>${showcase.code({ title: 'Submit a job', samples: [{ label: 'curl', lang: 'bash', code: SUBMIT_EXAMPLE }] })}<section class="sc-sec" aria-label="Job routes">
<ul class="facts">
<li>${code('GET /api/v1/jobs/:id')}: state, node, timings, exit and metered seconds.</li>
<li>${code('GET /api/v1/jobs')}: the project's jobs, newest first.</li>