The official Appwrite Documentation source code.
target="_blank"
)rel="noopener"
Use the following HTML structure to present code examples:
<div class="ide margin-top-small" data-lang="ruby" data-lang-label="Ruby SDK">
<pre class="line-numbers"><code class="prism language-ruby" data-prism>#ruby code here...</code></pre>
</div>
As of writing this, these are the supported languages for code examples:
For showing examples in multiple languages use the list structure:
<ul class="phases clear" data-ui-phases>
<li>
<h3>Node.js</h3>
<div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
<pre class="line-numbers"><code class="prism language-javascript" data-prism>// node code here...</code></pre>
</div>
</li>
<li>
<h3>PHP</h3>
<div class="ide margin-top-small" data-lang="php" data-lang-label="PHP SDK">
<pre class="line-numbers"><code class="prism language-php" data-prism>//php code here..</code></pre>
</div>
</li>
</ul>
Don't forget to use proper indenting for all code examples. The indenting of the code examples should be independent from the indentation of the surrounding HTML tags.
Use the following HTML structure to add important notes inside your docs:
<div class="notice">
<h2>Important Message</h2>
<p>Message content here.</p>
</div>
Use the following HTML structure to add images. You can also add support for dark and light mode versions (recommended!). If no dark mode is provided, light mode will be the fallback. Don't forget to provide alternative text for user accessibility and a description for each image.
<?php
$image = new View(__DIR__.'/../general/image.phtml');
echo $image
->setParam('srcLight', '/images-ee/docs/functions-light.png')
->setParam('srcDark', '/images-ee/docs/functions-dark.png')
->setParam('alt', 'Function settings page.')
->setParam('description', 'Function settings page.')
->render();
?>
At any point, if you are stuck, feel free to hop on our Discord server to ask questions or seek mentorship!
Join our growing community around the world! See our official Blog. Follow us on Twitter, Facebook Page, Facebook Group , DEV Community or join our live Discord server for more help, ideas, and discussions.