Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed May 4, 2024
1 parent 2b4b731 commit 3adaf16
Show file tree
Hide file tree
Showing 53 changed files with 98 additions and 0 deletions.
Empty file added docs/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/assets/light-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/assets/light-on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/assets/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/classes.html
Empty file.
Empty file added docs/conditions.html
Empty file.
Empty file added docs/css/styles.css
Empty file.
Empty file added docs/docs.html
Empty file.
Empty file added docs/docs.json
Empty file.
Empty file added docs/effects.html
Empty file.
Empty file added docs/events.html
Empty file.
Empty file added docs/expressions.html
Empty file.
Empty file added docs/functions.html
Empty file.
Empty file added docs/index.html
Empty file.
Empty file added docs/js/functions.js
Empty file.
Empty file added docs/js/main.js
Empty file.
Empty file added docs/js/theme-switcher.js
Empty file.
Empty file added docs/sections.html
Empty file.
Empty file added docs/structures.html
Empty file.
22 changes: 22 additions & 0 deletions docs/templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Skript Documentation Templates

When generating final result, each HTML file is surrounded by template.html,
which provides head element, navigation bar and so on.

## Template Patterns

Patterns have syntax of ${pattern_here}. For example, ${skript.version} is replaced with
current Skript version. Please see below for more...

You can also include other files by using ${include <filename>}. Just please make
sure that those included files don't have tags which are not allowed in position
where include is called.

## Pattern Reference
```
skript.* - Information of Skript
version - Skript's version
include <filename> - Load given file and place them here
generate <expressions/effects/events/types/functions> <loop template file> - Generated reference
content - In template.html, marks the point where other file is placed
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/templates/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/templates/classes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1 id="nav-title">Types</h1>

<div id="content">
${generate classes desc_full.html}
</div>
Empty file added docs/templates/conditions.html
Empty file.
Empty file added docs/templates/css/styles.css
Empty file.
Empty file added docs/templates/docs.html
Empty file.
Empty file added docs/templates/docs.json
Empty file.
Empty file added docs/templates/effects.html
Empty file.
Empty file added docs/templates/events.html
Empty file.
Empty file added docs/templates/expressions.html
Empty file.
Empty file added docs/templates/functions.html
Empty file.
65 changes: 65 additions & 0 deletions docs/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<h1 id="nav-title">Documentation</h1>

<div id="content-no-docs" class="no-left-panel" style="display: inline-block;">
<div style="height: 32px;"></div> <!-- Space -->
<p> <span style="font-size: 60px; font-weight: bold;">Skript</span> is (surprise, surprise) a scripting plugin for the Bukkit platform. It is easy to use for
simple tasks, but you can also create really complex things with it. The syntax of Skript is close to
English, but it is still not magic. While you might succeed with experimentation for simple tasks, for
anything more complex you will need some guidance. </p>
<p> This is Skript's documentation. You will find all supported features of the plugin here, along with some
useful examples. We don't have tutorials yet, but you can find good ones using whatever search engine you
prefer. </p>

<p class="box-title">Quick Look</p>
<pre class="box code" style="height: 460px; overflow: auto;"><code class="bash">
command /sethome:<br/>
permission: skript.home # Permission required for this command<br/>
description: Set your home # Description of this command<br/>
executable by: players # Console won't be able to run this command<br/>
trigger: # The actual trigger/code that will run when someone do /sethome<br/>
# Set a unique variable to sender's location<br/>
set {home::%uuid of player%} to location of player<br/>
# Send a message to the sender<br/>
message &quot;Set your home to &lt;grey&gt;%location of player%&lt;reset&gt;&quot;<br/>
<br/>
command /home:<br/>
permission: skript.home<br/>
description: Teleport yourself to your home<br/>
trigger:<br/>
# Check if that variable we used in /sethome has been set (in other words, if player ever ran /sethome)<br/>
if {home::%uuid of player%} is not set:<br/>
message &quot;You have not set your home yet!&quot;<br/>
stop trigger # stop the code here, lines below won't run<br/>
# Teleport the player to their home<br/>
teleport player to {home::%uuid of player%}<br/>
send &quot;&amp;aYou have been teleported.&quot;<br/>
</code></pre>

<div id="info" class="grid-container padding">
<div class="grid-item">
<p class="box-title">Latest Stable Version</p>
<p class="box placeholder"><a class="link" href="https://github.com/SkriptLang/Skript/releases/tag/${stable-version}" target="_blank">Skript ${stable-version}</a></p>
</div>
<div class="grid-item">
<p class="box-title">Latest Version</p>
<p class="box placeholder"><a class="link" href="https://github.com/SkriptLang/Skript/releases/tag/${latest-version}" target="_blank">Skript ${latest-version}</a></p>
</div>
<div class="grid-item">
<p class="box-title">Contributors</p>
<p class="box placeholder"><a class="link" href="https://github.com/SkriptLang/Skript/graphs/contributors" target="_blank">${contributors-size} Contributors</a></p>
</div>
</div>

<p class="box"> Found something incorrect in this documentation? Please report it to the <a
href="https://github.com/SkriptLang/skript-docs/issues/">issue tracker</a>. </p>
<p class="box"> <strong>We are looking for docs authors!</strong> Currently, the only documentation is generated
automatically. It would be nice to have some hand-written content such as tutorials on the docs as well. For
example, currently we don't have a tutorial on how to use loops here; This makes it harder for newcomers to
learn. Check <a href="https://github.com/SkriptLang/skript-docs/issues/12">this issue</a> for more details and
if you're interested in helping out. </p>


<div style="padding-top: 64px;"></div> <!-- Space -->
<p style="font-size: 14px; text-align: center;" class="placeholder"><a href="https://github.com/SkriptLang/skript-docs">Documentation Repo</a>
Site developed by <a href="https://github.com/AyhamAl-Ali">Ayham Al-Ali</a> • Site Version <b>${site-version}</b> • Generated on <b>${skript.build.date}</b></p>
<div style="padding-top: 16px;"></div> <!-- Space -->
Empty file added docs/templates/js/functions.js
Empty file.
Empty file added docs/templates/js/main.js
Empty file.
Empty file.
Empty file added docs/templates/sections.html
Empty file.
6 changes: 6 additions & 0 deletions docs/templates/structures.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<h1 id="nav-title">Structures</h1>

<div id="content">

${generate structures desc_full.html}
</div>
Empty file added docs/templates/template.html
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added docs/templates/text.html
Empty file.
Empty file added docs/templates/tutorials.html
Empty file.
Empty file added docs/text.html
Empty file.
Empty file added docs/tutorials.html
Empty file.

0 comments on commit 3adaf16

Please sign in to comment.