website/public/docs/v3.1.4/Reference/PHP/VV/init.php
Victor Westerlund cc3803d414 content(fix): replace the word 'compile' with 'bundle' and add new examples to features page (#11)
The word "compile" is not really what this thing is doing, so I replaced every "compile" reference to "bundle" instead.

I also added an anchor tag example to the "navigate any element" snippet on the /features page. And I also copied the asset injection example from the /index page into the /features page.

Reviewed-on: https://codeberg.org/vegvisir/website/pulls/11
2025-06-06 09:26:51 +02:00

35 lines
No EOL
1.2 KiB
PHP

<?= VV::include("public/docs/v3.1.4/Reference/layout") ?>
<main>
<section>
<h1>VV::init()</h1>
<p>Initialize the Vegvisir front-end.</p>
<p>Place this as close to the bottom of your <code>body</code> tag in your <code>shell_page</code> as possible.</p>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/PHP/VV/init/description") ?>
</section>
<section>
<h1>Parameters</h1>
</section>
<section class="md param">
<p>This method takes no parameters.</p>
</section>
<section>
<h1>Return value</h1>
</section>
<section>
<h3><code class="mtk6">string</code></h3>
<p>Returns a script tag with the bundled and minified JavaScript required to run the Vegvisir front-end.</p>
</section>
<hr>
<section>
<h1>Examples</h1>
</section>
<section>
<h2>Initializing a Vegvisir website</h2>
<p>In this example we will initialize a single-page website with the two required files to run a bare-bones Vegvisir website: <code>/public/index.php</code> and <code>/public/shell.php</code>.</p>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/PHP/VV/init/example_init") ?>
</section>
</main>