diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 00000000000..4bb271bdcd3 --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,43 @@ +name: Deploy new Documentation + +on: + release: + types: [published] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v2 + + - name: Checkout submodules + uses: textbook/git-checkout-submodule-action@2.0.0 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Build Skript + run: ./gradlew clean build + + - name: Generate new documentation + if: success() + run: | + ./gradlew generateDocs + git config --global user.email "${EMAIL}" + git config --global user.name "SkriptLang" + git clone https://${ACCESS_TOKEN}@github.com/SkriptLang/skript-website-public.git + cd skript-website-public + git checkout -b update/docs + rm docs.json + mv ../src/main/resources/docs.json docs.json + git add . + git commit -m "[update] - Updated documentation" + git push origin update/docs -f + env: + EMAIL: ${{ secrets.EMAIL }} + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 2041757711a..00000000000 --- a/docs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Skript Documentation Templates - -Skript's features are documented directly in it's Java code. But we still need - -1. HTML, CSS and (possible) Javascript code to create website out of these -2. Clear tutorials, not just "you can check the syntax pattern" -3. Examples explained, if needed - -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 }. 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 - Load given file and place them here -generate - Generated reference -content - In template.html, marks the point where other file is placed -``` diff --git a/docs/classes.html b/docs/classes.html deleted file mode 100644 index 8685ad71de0..00000000000 --- a/docs/classes.html +++ /dev/null @@ -1,5 +0,0 @@ -

Types

- -
- ${generate classes desc_full.html} -
\ No newline at end of file diff --git a/docs/conditions.html b/docs/conditions.html deleted file mode 100644 index 091bdf2d1c4..00000000000 --- a/docs/conditions.html +++ /dev/null @@ -1,5 +0,0 @@ -

Conditions

- -
- ${generate conditions desc_full.html} -
diff --git a/docs/css/styles.css b/docs/css/styles.css deleted file mode 100644 index 988261cef89..00000000000 --- a/docs/css/styles.css +++ /dev/null @@ -1,252 +0,0 @@ -* { - margin: 0px; - padding: 0px; -} - -body { - font-family: arial; - background-color: oldlace; - display: grid; - grid-template-rows: 100vh 100vh; - grid-template-columns: minmax(15em, 18em) minmax(80%, 100%); - overflow: hidden; -} - -a { - color: darkcyan; -} - -a:visited { - color: mediumorchid; -} - -#global-navigation { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 2; - position: sticky; - top: 0em; - - background-color: tan; - padding: 1em; - padding-left: 0em; - height: 1.37em; - z-index: 9999; -} - -#global-navigation > a { - text-decoration: none; - color: #403200; - font-size: 120%; - font-weight: bold; - - padding: 0.8em; -} - -#global-navigation > a:hover { - color: black; - background-color: #c1a97c; -} - -#side-nav { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 1; - grid-column-end: 1; - position: sticky; - top: 3.2em; -} - -#nav-title { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 1; - grid-column-end: 1; - position: sticky; - top: 0em; - - text-decoration: none; - background-color: tan; - font-size: 130%; - font-weight: bold; - - padding: 0.88em; - padding-top: 0.7em; - padding-left: 1em; - height: 1em; - z-index: 9999; -} - -#nav-contents { - height: calc(100vh - 3.2em); - overflow: scroll; - overflow-x: hidden; - position: sticky; - top: 3.2em; -} - -#nav-contents > a { - display: inline-block; - width: 100%; - font-size: 110%; - background-color: navajowhite; - text-decoration: none; - color: #403200; - - padding: 0.3em; - padding-left: 1em; -} - -#nav-contents > a:hover { - color: black; - background-color: #c1a97c; -} - -#content { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 2; - overflow: scroll; - overflow-x: hidden; - - padding: 0.22em; - position: sticky; - top: 3.3em; - height: calc(100vh - 3.6em); -} - -#content > p { - margin-bottom: 0.7em; - max-width: 55em; -} - -table { - width: 100%; - border-collapse: collapse; -} - -.item-title { - font-size: 130%; - padding: 0.2em; - padding-top: 0.5em; - padding-left: 0.4em; - - color: #261908; -} - -.item-title > a { - text-decoration: none; -} - -.item-table-label { - background-color: burlywood; - border-color: burlywood; - border-style: solid; - border-right-style: none; - border-width: 1px; - - width: 10em; - padding: 0.3em; -} - -.item-details { - display: block; - border-collapse: collapse; -} - -.item-details td:nth-child(2) { - border-style: solid; - border-left-style: none; - border-color: burlywood; - border-width: 1px; - width: 80%; - max-width: 20em; - padding-left: 0.2em; -} - -.noleftpad { - padding-left: 0em !important; -} - -td ul { - padding: 0em; - list-style-type: none; -} - -.item-description { - margin-top: 0.2em; - width: 82.5%; - max-width: 55em; - - line-height: 120%; - letter-spacing: 0.04px; - text-rendering: optimizelegibility; -} - -.item-description > p { - margin-top: 0.7em; -} - -.skript-code-block { - padding: 0.52em; - font-family: monospace; - width: 82.5%; - max-width: 69.6em; - background-color: gainsboro; -} - -.skript-code-block > a { - text-decoration: none; -} - -ul > .skript-code-block { - width: 98.4%; -} - -.item-examples { - padding-top: 0.5em; -} - -.item-examples > .skript-code-block { - margin-left: 0.15em; - margin-top: 0.3em; -} - -.box { - border-style: solid; - border-color: burlywood; - border-width: 2px; - border-top-width: 1em; - border-radius: 3px; - padding: 0.8em; - - background-color: wheat; -} - -@media (max-width: 600px) { - body { - grid-template-columns: 0px minmax(80%, 100%); - } - - #global-navigation { - height: 4.1em; - display: flex; - flex-wrap: wrap; - } - #global-navigation > a { - padding: 0.2em; - padding-top: 0.1em; - padding-bottom: 0.1em; - } - - #nav-title { - display: none; - } - #side-nav { - display: none; - } - - #content { - top: 5.63em; - } -} diff --git a/docs/docs.json b/docs/docs.json deleted file mode 100644 index a3fc012341e..00000000000 --- a/docs/docs.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "skriptVersion" : "${skript.version}", - - "classes" : [ - ${generate classes desc_full.json} - {"end" : true} - ], - - "conditions" : [ - ${generate conditions desc_full.json} - {"end" : true} - ], - - "effects" : [ - ${generate effects desc_full.json} - {"end" : true} - ], - - "events" : [ - ${generate events desc_full.json} - {"end" : true} - ], - - "expressions" : [ - ${generate expressions desc_full.json} - {"end" : true} - ], - - "functions" : [ - ${generate functions desc_full.json} - {"end" : true} - ] -} diff --git a/docs/effects.html b/docs/effects.html deleted file mode 100644 index 3f2811fd076..00000000000 --- a/docs/effects.html +++ /dev/null @@ -1,5 +0,0 @@ -

Effects

- -
- ${generate effects desc_full.html} -
\ No newline at end of file diff --git a/docs/events.html b/docs/events.html deleted file mode 100644 index 119fd0e558b..00000000000 --- a/docs/events.html +++ /dev/null @@ -1,5 +0,0 @@ -

Events

- -
- ${generate events desc_full.html} -
diff --git a/docs/expressions.html b/docs/expressions.html deleted file mode 100644 index 7eca87e5f64..00000000000 --- a/docs/expressions.html +++ /dev/null @@ -1,5 +0,0 @@ -

Expressions

- -
- ${generate expressions desc_full.html} -
\ No newline at end of file diff --git a/docs/functions.html b/docs/functions.html deleted file mode 100644 index 2f5a02ee9ef..00000000000 --- a/docs/functions.html +++ /dev/null @@ -1,10 +0,0 @@ -

Functions

- -

- These functions are defined by Skript. You may also create your own functions! - Tutorial for doing so is planned, but right now you need to seek it elsewhere. -

- -
- ${generate functions desc_full.html} -
diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 3287f317c53..00000000000 --- a/docs/index.html +++ /dev/null @@ -1,31 +0,0 @@ -

Documentation

- -
-

- Skript is (surprise, surprise) a scripting plugin for Bukkit platform. It - is easy to use for simple tasks, but yet you can create really complex things - with it. The syntax of Skript is close to English, but it is still not magic. - While for simple tasks you might succeed with experimentation, for anything - more complex you will need some guidance. -

- -

- This is the Skript documentation. You will find all supported features of Skript - plugin here. You might also find some useful examples, in case you need more - than what was shipped with Skript distribution. We do not currently have - tutorials here, but you can find good ones using whatever search engine you prefer. -

- -

- Found something incorrect in this documentation? Please report - it to the issue tracker. -

-

- We are looking for docs authors! - 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 this issue for - more details and if you're interested in helping out. -

-
diff --git a/docs/template.html b/docs/template.html deleted file mode 100644 index ea88756d215..00000000000 --- a/docs/template.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Skript Documentation - ${skript.version} - - - - ${include navbar.html} - - ${content} - - diff --git a/docs/templates/desc_full.html b/docs/templates/desc_full.html deleted file mode 100644 index cc8c8dd2091..00000000000 --- a/docs/templates/desc_full.html +++ /dev/null @@ -1,51 +0,0 @@ -
- ${element.name} - 🔗 -
-
- - - - - - - - - - - - - ${if events} - - - - - ${end} - - ${if required-plugins} - - - - - ${end} - -
Patterns: -
    - ${generate element.patterns pattern_element.html} -
-
Since:${element.since}
Usable in events:${element.events}
Requirements:${element.required-plugins}
- -
- ${element.desc} -
- -
- - Examples: - -
- ${element.examples} -
- -
-
diff --git a/docs/templates/desc_full.json b/docs/templates/desc_full.json deleted file mode 100644 index 9acb3793baf..00000000000 --- a/docs/templates/desc_full.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id" : "${element.id}", - "name" : "${element.name}", - "patterns" : [ - ${generate element.patterns-safe pattern_element.json} - "pattern_end" - ], - "since" : "${element.since}", - "description" : "${element.desc-safe}", - "examples" : "${element.examples-safe}" -}, diff --git a/docs/templates/desc_nav.html b/docs/templates/desc_nav.html deleted file mode 100644 index 8a749025b54..00000000000 --- a/docs/templates/desc_nav.html +++ /dev/null @@ -1 +0,0 @@ -${element.name} diff --git a/docs/templates/navbar.html b/docs/templates/navbar.html deleted file mode 100644 index ecdc86dde21..00000000000 --- a/docs/templates/navbar.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/docs/templates/pattern_element.html b/docs/templates/pattern_element.html deleted file mode 100644 index 40bdd4dcfc3..00000000000 --- a/docs/templates/pattern_element.html +++ /dev/null @@ -1 +0,0 @@ -
  • ${element.pattern}
  • diff --git a/docs/templates/pattern_element.json b/docs/templates/pattern_element.json deleted file mode 100644 index 391cc6257da..00000000000 --- a/docs/templates/pattern_element.json +++ /dev/null @@ -1 +0,0 @@ -"${element.pattern}", diff --git a/docs/text.html b/docs/text.html deleted file mode 100644 index bc9fac91149..00000000000 --- a/docs/text.html +++ /dev/null @@ -1,207 +0,0 @@ -

    Text in Scripts

    - -
    -Skript allows you to write pieces of text (programmers usually call them strings) -in the scripts. This is done by putting the text inside double quotes, as follows: -
    -"this is text" -
    -Simple, isn't it? If an effect, expression, condition, trigger or function -accepts something of type text or string, you can use this format to write it -right there! -

    Formatting Text

    -But isn't just text a bit boring? Worry not, as Minecraft has support for colors, -styles and other formatting options in chat. Most of the options also work with -item and entity names. - -

    Colors

    -Minecraft has 16 pre-set color codes to be used in text. Skript supports them -in two different ways: -
      -
    • Color name tags, for example <red>
    • -
    • (Old) Minecraft color codes, like §c; using & works, too
    • -
    -

    -Here's a table of all colors, including both Skript names and color codes: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CodeNameAlternative Names
    §0black
    §1bluedark blue
    §2greendark green
    §3cyanaqua, dark cyan, dark aqua, dark turquoise, dark turquois
    §4reddark red
    §5purpledark purple
    §6orangeorange, gold, dark yellow
    §7greylight grey, gray, light gray, silver
    §8greylight grey, gray, light gray, silver
    §9light bluelight blue, indigo
    §alight greenlime, lime green
    §blight cyanlight aqua, turquoise, turquois, light blue
    §clight redpink
    §dmagentalight purple
    §eyellowlight yellow
    §fwhite
    -For information not related to Skript, see -Minecraft -Wiki page concerning colors. - -Note that depending on Skript configuration, color codes may do more than just -change color of text after them. By default, for backwards compatibility, they -clear following styles: magic, bold, strikethrough, underlined, italic. Other -styles are not affected, and this feature can be toggled of in config.sk. - -

    Other Styles

    -Minecraft also has various other styles available. The following are available -everywhere, including item and entity names: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CodeNameAlternative Names
    §kmagicobfuscated
    §lboldb
    §mstrikethroughstrike, s
    §nunderlinedunderline, u
    §oitalicitalics, i
    §rresetr
    -If it wasn't clear from the table, §r clears all other formatting and colors. -You'll probably use it quite often when sending chat messages from scripts. -

    -Skript also supports certain newer features, which are only available in chat. -Those do not have formatting codes, so you must use tags for them. - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameAlternative NamesDescription
    linkopen url, urlOpens a link when player clicks on text
    run commandcommand, cmdMakes player execute a chat command when they click on text
    suggest commandAdds a command to chat prompt of player when clicked
    tooltipshow textShows a tooltip when player hovers over text with their mouse
    - -All of these styles require a parameter, in format -<name:parameter> -For link, parameter must be either http or https url if you want clients to -recognize it. For others, it can be any text you'd like -(you can make player run invalid commands if you wish). - -

    Text and Variables

    -Variable names are text, but obviously formatting that text does no good. -However, everything else you can do for text, you can do for variable names. -A guide about this is coming... some day. -

    -Guide written by bensku. -

    \ No newline at end of file