From 65a7c1e87b5d1a35f94e60f588e21bbac5b02ad8 Mon Sep 17 00:00:00 2001 From: Milan Jaros Date: Wed, 25 Dec 2024 21:09:36 +0100 Subject: [PATCH 1/7] Add Getting started tutorial and link between pages. --- README.md | 9 +-- docs/templates/getting-started.html | 82 ++++++++++++++++++++++++++++ docs/templates/index.html | 10 ++++ docs/templates/templates/navbar.html | 1 + docs/templates/text.html | 12 +++- 5 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 docs/templates/getting-started.html diff --git a/README.md b/README.md index 0378fd03da1..44497aff9b1 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ You can find more about the docs templates in [docs/templates](docs/templates/RE Currently, the docs files is generated using Skript plugin. 1. You will need to create a directory named `docs/templates` in `plugins/Skript/`, and copy everything from [docs/templates folder](docs/templates) into that directory. -2. Execute the command `/sk gen-docs`. -3. The `docs/` directory will be created _(if not created already)_ in `plugins/Skript` containing the website's files. -4. Open `index.html` and browse the documentation. -5. _(Optionally)_ Add this system property `-Dskript.forceregisterhooks` in your server startup script (before the -jar property) to force generating hooks docs. +2. Launch the server ([Paper](https://papermc.io/), which is a fork of Spigot, is recommended). +3. Execute the command `skript gen-docs` (formerly `/sk gen-docs`) +4. The `docs/` directory will be created _(if not created already)_ in `plugins/Skript` containing the website's files. +5. Open `index.html` and browse the documentation. +6. _(Optionally)_ Add this system property `-Dskript.forceregisterhooks` in your server startup script (before the -jar property) to force generating hooks docs. diff --git a/docs/templates/getting-started.html b/docs/templates/getting-started.html new file mode 100644 index 00000000000..a2a0f50f7c3 --- /dev/null +++ b/docs/templates/getting-started.html @@ -0,0 +1,82 @@ +

Get started

+ +
+

Requirements

+

+ Skript requires Spigot to work. You heard it right, CraftBukkit does not work. Paper, which is a fork of Spigot, is recommended; it is required for some parts of + Skript to be available. +

+

+ Skript supports only the latest patch versions of Minecraft. For example, this means that if 1.16.5 is supported, + then 1.16.4 is not. Testing with all old patch versions is not feasible for us. +

+

+ Minecraft 1.12 and earlier are not, and will not be supported. New Minecraft versions will be supported as soon as + possible. +

+

Downloading Skript

+

+ You can find the downloads for each version with their release notes in the releases page (scroll down to the Assets section and + download the .jar file). +

+

+ Two major feature updates are expected each year in January and July, with monthly patches occurring in between. For + full details, please review our release model. +

+

Adding plugin

+

+ Follow these simple steps to add Skript plugin to the Paper server: +

+ +
    +
  1. + Ensure the file you have downloaded ends in .jar. Some plugins also distribute as .zip + files, in which case you will need to extract the file and locate the .jar for your platform. +
  2. +
  3. + Once you have the plugin downloaded locally, locate the plugins folder from the root directory of + your Paper server. +
  4. +
  5. + Drag and drop the plugin file (.jar) into the plugins folder. +
  6. +
  7. + Restart your server. The plugin should load. +
  8. +
+ +

+ For more information see the Paper tutorial. +

+

Add the frist script

+

+ Once you have restarted server, you should see the folder scripts inside of plugins/Script + folder. +

+

+ Just create a-new-file.sk file with a following content: +

+
+      on click: 
+        message "Hello player!" to player
+

+ For more examples see the examples folder. +

+ +
+
+

Previous step

+

Introduction

+
+
+
+
+

Next step

+

Text and formatting

+
+
+
+
\ No newline at end of file diff --git a/docs/templates/index.html b/docs/templates/index.html index 193c3834f84..37922c5541d 100644 --- a/docs/templates/index.html +++ b/docs/templates/index.html @@ -59,6 +59,16 @@

Documentation

if you're interested in helping out.

+
+
+
+
+
+
+

Next step

+

Getting started

+
+

Documentation Repo • Site developed by Ayham Al-Ali • Site Version ${site-version} • Generated on ${skript.build.date}

diff --git a/docs/templates/templates/navbar.html b/docs/templates/templates/navbar.html index e2e00ca2945..376aab7620f 100644 --- a/docs/templates/templates/navbar.html +++ b/docs/templates/templates/navbar.html @@ -20,6 +20,7 @@ diff --git a/docs/templates/text.html b/docs/templates/text.html index 89a18bc0218..9177c31ecbe 100644 --- a/docs/templates/text.html +++ b/docs/templates/text.html @@ -332,6 +332,16 @@

Text and Variables

Guide written by bensku. -

+

+
+
+

Previous step

+

Getting started

+
+
+
+
+
+
\ No newline at end of file From b953eb62d966c403a276505237a58a55e26cbd7a Mon Sep 17 00:00:00 2001 From: Milan Jaros Date: Wed, 25 Dec 2024 22:39:45 +0100 Subject: [PATCH 2/7] Add TLDR, more links and fix typos --- README.md | 2 +- docs/templates/getting-started.html | 10 ++++++++-- docs/templates/text.html | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 44497aff9b1..2d552c2cf7e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ You can find more about the docs templates in [docs/templates](docs/templates/RE Currently, the docs files is generated using Skript plugin. 1. You will need to create a directory named `docs/templates` in `plugins/Skript/`, and copy everything from [docs/templates folder](docs/templates) into that directory. -2. Launch the server ([Paper](https://papermc.io/), which is a fork of Spigot, is recommended). +2. Launch the server (the [Paper](https://papermc.io/), which is a fork of Spigot, is recommended). 3. Execute the command `skript gen-docs` (formerly `/sk gen-docs`) 4. The `docs/` directory will be created _(if not created already)_ in `plugins/Skript` containing the website's files. 5. Open `index.html` and browse the documentation. diff --git a/docs/templates/getting-started.html b/docs/templates/getting-started.html index a2a0f50f7c3..619decb91d6 100644 --- a/docs/templates/getting-started.html +++ b/docs/templates/getting-started.html @@ -1,6 +1,11 @@

Get started

+
+

+ To run a custom .sk script from plugins/Skript/scripts you should add Skript plugin to the Paper server. +

Requirements

Skript requires Spigot to work. You heard it right, CraftBukkit does not work. Adding plugin

For more information see the Paper tutorial.

-

Add the frist script

+ +

Adding the frist script

- Once you have restarted server, you should see the folder scripts inside of plugins/Script + Once you have restarted server, you should see the folder scripts inside of plugins/Skript folder.

diff --git a/docs/templates/text.html b/docs/templates/text.html index 9177c31ecbe..852970290ae 100644 --- a/docs/templates/text.html +++ b/docs/templates/text.html @@ -341,6 +341,8 @@

Text and Variables

+

Next step

+

Explore Events docs

From 34bda5910ec48c2c35bdc0ada595dd5400789791 Mon Sep 17 00:00:00 2001 From: Milan Jaros Date: Wed, 25 Dec 2024 22:45:39 +0100 Subject: [PATCH 3/7] Add link to tutorials --- docs/templates/tutorials.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/templates/tutorials.html b/docs/templates/tutorials.html index d4e74bb75c6..a54b269239d 100644 --- a/docs/templates/tutorials.html +++ b/docs/templates/tutorials.html @@ -1,5 +1,14 @@

Tutorials

+
+
+
+
+
+ +

Note:

Skript Tutorials are coming soon. From e7094ee9a1c6277eee50459085bc4c6a108d8d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Jaro=C5=A1?= Date: Tue, 7 Jan 2025 22:05:39 +0100 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: Ayham Al Ali <20037329+AyhamAl-Ali@users.noreply.github.com> Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com> --- README.md | 6 +++--- docs/templates/getting-started.html | 15 ++++++++------- docs/templates/text.html | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2d552c2cf7e..fe8c5e88fb0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Currently, the docs files is generated using Skript plugin. 1. You will need to create a directory named `docs/templates` in `plugins/Skript/`, and copy everything from [docs/templates folder](docs/templates) into that directory. 2. Launch the server (the [Paper](https://papermc.io/), which is a fork of Spigot, is recommended). -3. Execute the command `skript gen-docs` (formerly `/sk gen-docs`) -4. The `docs/` directory will be created _(if not created already)_ in `plugins/Skript` containing the website's files. +3. Execute the command `skript gen-docs` +4. The `docs/` directory will be created _(if not created already)_ in `plugins/Skript`, containing the website's files. 5. Open `index.html` and browse the documentation. -6. _(Optionally)_ Add this system property `-Dskript.forceregisterhooks` in your server startup script (before the -jar property) to force generating hooks docs. +6. _(Optionally)_ Add this system property `-Dskript.forceregisterhooks` in your server startup script (before the -jar property) to force generating docs for Skript's hooks. diff --git a/docs/templates/getting-started.html b/docs/templates/getting-started.html index 619decb91d6..6710e50e241 100644 --- a/docs/templates/getting-started.html +++ b/docs/templates/getting-started.html @@ -1,9 +1,9 @@ -

Get started

+

Getting started

- To run a custom .sk script from plugins/Skript/scripts you should add Skript plugin to the .sk script from plugins/Skript/scripts, you should add the Skript plugin to the Paper server.

Requirements

@@ -42,7 +42,7 @@

Adding plugin

files, in which case you will need to extract the file and locate the .jar for your platform.
  • - Once you have the plugin downloaded locally, locate the plugins folder from the root directory of + Once you have downloaded the plugin, locate the plugins folder from the root directory of your Paper server.
  • @@ -57,19 +57,20 @@

    Adding plugin

    For more information see the Paper tutorial.

    -

    Adding the frist script

    +

    Adding the first script

    - Once you have restarted server, you should see the folder scripts inside of plugins/Skript + Once you have started the server, you should see the folder scripts inside of plugins/Skript folder.

    - Just create a-new-file.sk file with a following content: + Just create a-new-file.sk file with the following example code:

           on click: 
             message "Hello player!" to player

    - For more examples see the examples folder. + This piece of code displays the message "Hello player!" every time the user "clicks" (i.e. performs the mine action). + For more examples see the examples folder inside plugins/Skript/scripts.

    diff --git a/docs/templates/text.html b/docs/templates/text.html index 852970290ae..69a5149dea8 100644 --- a/docs/templates/text.html +++ b/docs/templates/text.html @@ -342,7 +342,7 @@

    Text and Variables

  • From d14172aaebae34b32843b44f2924c1c11d19282a Mon Sep 17 00:00:00 2001 From: Milan Jaros Date: Tue, 7 Jan 2025 22:32:13 +0100 Subject: [PATCH 5/7] Apply some suggestions from code review --- docs/templates/getting-started.html | 33 ++++++++++++++--------------- docs/templates/index.html | 12 ++--------- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/docs/templates/getting-started.html b/docs/templates/getting-started.html index 6710e50e241..7e9b93510e5 100644 --- a/docs/templates/getting-started.html +++ b/docs/templates/getting-started.html @@ -3,20 +3,18 @@

    Getting started

    - To run a custom .sk script from plugins/Skript/scripts, you should add the Skript plugin to the Paper server. + To run a custom .sk script from plugins/Skript/scripts you should add Skript plugin to the + Minecraft server.

    Requirements

    Skript requires Spigot to work. You heard it right, CraftBukkit does not work. Paper, which is a fork of Spigot, is recommended; it is required for some parts of Skript to be available. -

    -

    +
    Skript supports only the latest patch versions of Minecraft. For example, this means that if 1.16.5 is supported, then 1.16.4 is not. Testing with all old patch versions is not feasible for us. -

    -

    +
    Minecraft 1.12 and earlier are not, and will not be supported. New Minecraft versions will be supported as soon as possible.

    @@ -25,25 +23,24 @@

    Downloading Skript

    You can find the downloads for each version with their release notes in the releases page (scroll down to the Assets section and download the .jar file). -

    -

    +
    Two major feature updates are expected each year in January and July, with monthly patches occurring in between. For full details, please review our release model.

    Adding plugin

    - Follow these simple steps to add Skript plugin to the Paper server: -

    - + Follow these simple steps to add Skript plugin to the Minecraft server: +
    +
    1. Ensure the file you have downloaded ends in .jar. Some plugins also distribute as .zip files, in which case you will need to extract the file and locate the .jar for your platform.
    2. - Once you have downloaded the plugin, locate the plugins folder from the root directory of - your Paper server. + Once you have the plugin downloaded locally, locate the plugins folder from the root directory of + your Minecraft server.
    3. Drag and drop the plugin file (.jar) into the plugins folder. @@ -52,8 +49,9 @@

      Adding plugin

      Restart your server. The plugin should load.
    - +

    + For more information see the Paper tutorial.

    @@ -61,14 +59,15 @@

    Adding the first script

    Once you have started the server, you should see the folder scripts inside of plugins/Skript folder. -

    -

    +
    Just create a-new-file.sk file with the following example code: -

    +
           on click: 
             message "Hello player!" to player
    +

    + This piece of code displays the message "Hello player!" every time the user "clicks" (i.e. performs the mine action). For more examples see the examples folder inside plugins/Skript/scripts.

    diff --git a/docs/templates/index.html b/docs/templates/index.html index 37922c5541d..9638a501cb0 100644 --- a/docs/templates/index.html +++ b/docs/templates/index.html @@ -59,16 +59,8 @@

    Documentation

    if you're interested in helping out.

    -
    -
    -
    -
    -
    -
    -

    Next step

    -

    Getting started

    -
    -
    +

    Next step

    +

    Visit the Getting started page to learn more on how to install Skript and create your first script!

    Documentation Repo • Site developed by Ayham Al-Ali • Site Version ${site-version} • Generated on ${skript.build.date}

    From a0192877f05ee7c2428d4f4dae81839707b4c076 Mon Sep 17 00:00:00 2001 From: Milan Jaros Date: Tue, 7 Jan 2025 22:53:27 +0100 Subject: [PATCH 6/7] Reverted changes in tutorials.html --- docs/templates/tutorials.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/templates/tutorials.html b/docs/templates/tutorials.html index a54b269239d..d4e74bb75c6 100644 --- a/docs/templates/tutorials.html +++ b/docs/templates/tutorials.html @@ -1,14 +1,5 @@

    Tutorials

    -
    -
    -
    -
    -
    - -

    Note:

    Skript Tutorials are coming soon. From 941e2d901f5e2af7090ab64c3f9404df104c52e8 Mon Sep 17 00:00:00 2001 From: Milan Jaros Date: Tue, 7 Jan 2025 23:02:53 +0100 Subject: [PATCH 7/7] Apply suggestions from code review after confilct --- docs/templates/getting-started.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/templates/getting-started.html b/docs/templates/getting-started.html index 7e9b93510e5..85d25c5e5dd 100644 --- a/docs/templates/getting-started.html +++ b/docs/templates/getting-started.html @@ -3,7 +3,7 @@

    Getting started

    - To run a custom .sk script from plugins/Skript/scripts you should add Skript plugin to the + To run a custom .sk script from plugins/Skript/scripts, you should add the Skript plugin to the Minecraft server.

    Requirements

    @@ -39,7 +39,7 @@

    Adding plugin

    files, in which case you will need to extract the file and locate the .jar for your platform.
  • - Once you have the plugin downloaded locally, locate the plugins folder from the root directory of + Once you have downloaded the plugin, locate the plugins folder from the root directory of your Minecraft server.