From 9ac4849f86a8b22303bbc57841c967955130a59f Mon Sep 17 00:00:00 2001 From: Ryan Turner <16946913+TheSCREWEDSoftware@users.noreply.github.com> Date: Tue, 28 Apr 2026 12:45:08 +0100 Subject: [PATCH 01/10] Base YML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Stefano Borzì --- .github/workflows/generate-command-table.yml | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/generate-command-table.yml diff --git a/.github/workflows/generate-command-table.yml b/.github/workflows/generate-command-table.yml new file mode 100644 index 000000000..9d1560808 --- /dev/null +++ b/.github/workflows/generate-command-table.yml @@ -0,0 +1,26 @@ +name: generate-aowow-database +on: + workflow_dispatch: + +jobs: + generate-aowow-db: + permissions: write-all + runs-on: ubuntu-24.04 + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: "run scripts" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git clone https://github.com/azerothcore/acore-docker + cd acore-docker + docker compose up -d + cd ../setup/ + bash generate-db.sh + cd .. + revision=`mysql -u root -ppassword -P 63306 -h 127.0.0.1 -s -N -e "SELECT substring_index(substring_index(revision, 'rev. ', -1), '+ 2', 1) FROM acore_auth.uptime ORDER BY starttime DESC LIMIT 1;"` + release_name=$(date '+%Y-%m-%d_%H-%M-%S') + gh release create $release_name --title "$release_name" --notes "Revision: [$revision](https://github.com/azerothcore/azerothcore-wotlk/commit/$revision)" + gh release upload $release_name "aowow_db.sql.zip" \ No newline at end of file From d3dd738bb598aa6219f0412838f3f0f220e91ace Mon Sep 17 00:00:00 2001 From: Ryan Turner <16946913+TheSCREWEDSoftware@users.noreply.github.com> Date: Tue, 28 Apr 2026 12:51:02 +0100 Subject: [PATCH 02/10] Get command from acore_world --- .github/workflows/generate-command-table.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-command-table.yml b/.github/workflows/generate-command-table.yml index 9d1560808..f23df285b 100644 --- a/.github/workflows/generate-command-table.yml +++ b/.github/workflows/generate-command-table.yml @@ -1,4 +1,4 @@ -name: generate-aowow-database +name: generate-command-table-from-db on: workflow_dispatch: @@ -20,7 +20,9 @@ jobs: cd ../setup/ bash generate-db.sh cd .. + mysqldump -u root -ppassword -P 63306 -h 127.0.0.1 acore_world command > command_table.sql + zip command_table.sql.zip command_table.sql revision=`mysql -u root -ppassword -P 63306 -h 127.0.0.1 -s -N -e "SELECT substring_index(substring_index(revision, 'rev. ', -1), '+ 2', 1) FROM acore_auth.uptime ORDER BY starttime DESC LIMIT 1;"` release_name=$(date '+%Y-%m-%d_%H-%M-%S') gh release create $release_name --title "$release_name" --notes "Revision: [$revision](https://github.com/azerothcore/azerothcore-wotlk/commit/$revision)" - gh release upload $release_name "aowow_db.sql.zip" \ No newline at end of file + gh release upload $release_name "command_table.sql.zip" \ No newline at end of file From 3ac642a00744e643394875aead33945e06a41063 Mon Sep 17 00:00:00 2001 From: Ryan Turner <16946913+TheSCREWEDSoftware@users.noreply.github.com> Date: Tue, 28 Apr 2026 12:59:13 +0100 Subject: [PATCH 03/10] Dont need a bash file to export it --- .github/workflows/generate-command-table.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/generate-command-table.yml b/.github/workflows/generate-command-table.yml index f23df285b..85d2f3b42 100644 --- a/.github/workflows/generate-command-table.yml +++ b/.github/workflows/generate-command-table.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: jobs: - generate-aowow-db: + generate-command-table: permissions: write-all runs-on: ubuntu-24.04 steps: @@ -17,8 +17,6 @@ jobs: git clone https://github.com/azerothcore/acore-docker cd acore-docker docker compose up -d - cd ../setup/ - bash generate-db.sh cd .. mysqldump -u root -ppassword -P 63306 -h 127.0.0.1 acore_world command > command_table.sql zip command_table.sql.zip command_table.sql From bab2be8b6a69715e5340fda878ce778ee6e95bcc Mon Sep 17 00:00:00 2001 From: FlyingArowana <16946913+TheSCREWEDSoftware@users.noreply.github.com> Date: Tue, 6 Oct 2026 20:59:01 +0000 Subject: [PATCH 04/10] Site layout, sidebar, language buttons and local build scripts Co-Authored-By: Claude Opus 5.5 --- .env-files/Gemfile.github | 3 +- .gitattributes | 3 + .github/README.md | 126 ++++- .gitignore | 4 + _config.local.en.yml | 2 + _config.local.yml | 9 + _config.yml | 4 +- _includes/azerothcore/languages.html | 19 + _includes/azerothcore/sidebar.html | 263 ++++++++- .../components/action_btn/page_actions.html | 12 + .../components/copyrights/copyrights.html | 7 + _layouts/git-wiki-404.html | 15 + assets/css/azerothcore.css | 498 ++++++++++++++++++ docs/arch-linux.md | 3 + docs/classic-installation.md | 18 +- docs/client-setup.md | 18 +- docs/cluster-mode.md | 8 +- docs/cn/home.md | 2 - docs/core-installation.md | 18 +- docs/cpp-code-standards.md | 8 +- docs/database-installation.md | 18 +- docs/es/home.md | 2 - docs/final-server-steps.md | 18 +- docs/gm-commands.md | 2 +- docs/home.md | 2 - docs/hooks-script.md | 12 +- docs/how-to-create-a-pr.md | 2 +- docs/how-to-document-code.md | 2 +- docs/how-to-work-with-conf-files.md | 2 +- docs/installation.md | 6 +- docs/installing-a-module.md | 18 +- docs/keeping-the-server-up-to-date.md | 18 +- docs/linux-core-installation.md | 16 +- docs/linux-keeping-the-server-up-to-date.md | 18 +- docs/linux-requirements.md | 34 +- docs/macos-core-installation.md | 18 +- docs/macos-keeping-the-server-up-to-date.md | 18 +- docs/macos-requirements.md | 34 +- docs/networking.md | 18 +- docs/optional-additions.md | 18 +- docs/requirements.md | 22 +- docs/server-setup.md | 18 +- docs/spell_system.md | 2 +- docs/the-modular-structure.md | 2 +- docs/vsc-requirements.md | 19 +- docs/windows-core-installation.md | 18 +- docs/windows-keeping-the-server-up-to-date.md | 18 +- docs/windows-requirements.md | 22 +- docs/windows-vsc-core-installation.md | 12 +- tools/local_theme_cache.rb | 21 + tools/wiki.bat | 136 +++++ tools/wiki.sh | 104 ++++ 52 files changed, 1428 insertions(+), 282 deletions(-) create mode 100644 .gitattributes create mode 100644 _config.local.en.yml create mode 100644 _config.local.yml create mode 100644 _includes/azerothcore/languages.html create mode 100644 _includes/git-wiki/components/action_btn/page_actions.html create mode 100644 _includes/git-wiki/components/copyrights/copyrights.html create mode 100644 tools/local_theme_cache.rb create mode 100644 tools/wiki.bat create mode 100644 tools/wiki.sh diff --git a/.env-files/Gemfile.github b/.env-files/Gemfile.github index 8eceee697..2cac0081a 100644 --- a/.env-files/Gemfile.github +++ b/.env-files/Gemfile.github @@ -1,3 +1,4 @@ source 'http://rubygems.org' gem 'github-pages', group: :jekyll_plugins -gem "jekyll-gitlab-metadata" # for cross compatibility \ No newline at end of file +gem "jekyll-gitlab-metadata" # for cross compatibility +gem 'wdm', '>= 0.1.0', platforms: [:mingw, :x64_mingw, :mswin] diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..318e3adf8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# tools/wiki.sh must keep LF line endings, or bash cannot run it. +tools/wiki.sh text eol=lf +tools/wiki.bat text eol=crlf diff --git a/.github/README.md b/.github/README.md index 1e9b31e25..61d377c0f 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,7 +1,129 @@ # AzerothCore Wiki -Welcome to the AzerothCore Wiki! This repository provides comprehensive documentation for setting up, configuring, and customizing the AzerothCore WoW emulator. +Read in: [English :gb:](README.md) | [Español :es:](README_es.md) + +Welcome to the AzerothCore Wiki! This repository provides comprehensive documentation for setting up, configuring, and customizing the AzerothCore WoW emulator. The live site is at [azerothcore.org/wiki](https://www.azerothcore.org/wiki/home). If you want to contribute to the wiki please open a PR in the /docs/ directory. -Any problems? [Open a issue](https://github.com/azerothcore/wiki/issues/new). +Any problems? [Open an issue](https://github.com/azerothcore/wiki/issues/new). + +## Running it locally + +### With Docker + +1. Install [Docker](https://docs.docker.com/get-docker/). +2. Run `docker compose up github-wiki-theme` +3. Open `http://localhost:4000/home` + +### Without Docker + +Requires [Ruby](https://jekyllrb.com/docs/installation/) and Bundler (`gem install bundler`). + +> [!NOTE] +> These steps were tested on: +> +> - Windows 11 25H2 (OS Build 26200.9457) with Ruby 3.3.11 and Bundler 4.0.12 +> - Ubuntu 24.04.3 LTS (kernel 6.8.0-90-generic, x86_64, systemd 255) with Ruby 3.3.0 and Bundler 4.0.19 + +#### With the test script + +- Windows: double-click `wiki.bat` in the `tools` folder, or open a command prompt in `tools` and run `wiki build` +- Linux and macOS: in the `tools` folder run `./wiki.sh build` + +The script installs the gems if needed, stops any old server still running on port 4000, and serves the site. Then open `http://localhost:4000/wiki/home`. + +The first run can be slow, because Jekyll has to generate more than 500 pages (see [Build times](#build-times)). `--verbose` is enabled by default, so each page is printed as it is built and you can see that Jekyll has not hung. If you would rather not see the build progress, remove `--verbose` from the last line of the script. + +##### Options + +Add these words after the script name. They can be combined, in any order. In PowerShell write `.\wiki` instead of `wiki`. + +| Option | What it does | +| :------ | :----------- | +| `build` | Builds the English pages only, reusing the previous build. This is the fast, everyday mode, and what the script does when no option is given. | +| `all` | Also builds the Spanish and Chinese translations. That is about 1,500 pages, so it takes much longer. | +| `clean` | Throws away the previous build and the downloaded theme, and rebuilds everything. Use it if a page looks stale or wrong, or after changing the sidebar, a layout or `_config.yml`. | + +Without `clean`, the script reuses the previous build and only renders the pages that changed. For that it keeps the theme in the `.theme-cache` folder, which is not committed. + +Windows, from the `tools` folder: + +``` +wiki build +wiki build all +wiki clean +wiki clean all +``` + +Linux and macOS, from the `tools` folder: + +```bash +./wiki.sh build +./wiki.sh build all +./wiki.sh clean +./wiki.sh clean all +``` + +##### Build times + +When the build finishes, the script prints how long it took and which options were used. These are the times measured so far: + +| System | Command | Pages | Time | +| :----- | :------ | :---- | :--- | +| Windows 11 | `wiki clean` | about 560 (English only) | about 6 minutes | +| Windows 11 | `wiki clean all` | about 1,500 (English and 2 translations) | about 40 minutes | +| Ubuntu 24.04 | `./wiki.sh clean` | about 560 (English only) | about 8 minutes | +| Ubuntu 24.04 | `./wiki.sh clean all` | about 1,500 (English and 2 translations) | about 54 minutes | + +After the first build, saving a page only rebuilds that page, which takes about 10 seconds. + +The site is served on `127.0.0.1`, so only your own computer can open it. To let other devices on your network reach it, set `JEKYLL_HOST=0.0.0.0` before running the script: + +Windows: + +``` +set "JEKYLL_HOST=0.0.0.0" +wiki build +``` + +Linux and macOS: + +```bash +JEKYLL_HOST=0.0.0.0 ./wiki.sh build +``` + +Local previews do not create the redirects from old page addresses, because on Windows and macOS those would overwrite the real pages. + +#### Manually + +Copy `.env-files/Gemfile.github` to the root of the repository and name it `Gemfile`. Jekyll only loads the theme and the GitHub Pages plugins when the Gemfile is there. The copy is git-ignored. Then run: + +```bash +bundle install +bundle exec jekyll serve --baseurl /wiki +``` + +Then open `http://localhost:4000/wiki/home`. Jekyll watches the files and rebuilds on save, so just refresh the browser. + +The `--baseurl /wiki` part makes the sidebar links work: they point to `/wiki/...` like on the live site. + +## Project structure + +- `docs/` - the wiki pages, one Markdown file per page. `docs/es/` and `docs/cn/` hold the translations, `docs/archive/` the archived pages. +- `_includes/` - shared HTML: the sidebar (`azerothcore/sidebar.html`) and the notice boxes. +- `_layouts/`, `_sass/`, `assets/` - page templates, styling and scripts. +- `images/` - images used in the pages. +- `_config.yml` - the Jekyll configuration. +- `.env-files/`, `docker-compose.yml`, `tools/` - what is needed to run the site locally. + +## Adding content + +- Read the [Wiki Standards](https://www.azerothcore.org/wiki/wiki-standards) first. +- **New or changed page**: add or edit a Markdown file in `docs/`. `docs/my-page.md` is published as `/wiki/my-page`. +- **Database table page**: follow the [Database Table Template](https://www.azerothcore.org/wiki/database-table-template). +- **Sidebar**: edit `_includes/azerothcore/sidebar.html`. + +## Deployment + +The site is built and published from the `master` branch. There is no manual deploy step. diff --git a/.gitignore b/.gitignore index a8d179c4c..97d9f8534 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,13 @@ _site Gemfile.*.lock Gemfile.lock +Gemfile +.jekyll-metadata .sass-cache .DS_Store .idea/* .claude/ +.theme-cache/ +tools/logs/ diff --git a/_config.local.en.yml b/_config.local.en.yml new file mode 100644 index 000000000..75c6a01b5 --- /dev/null +++ b/_config.local.en.yml @@ -0,0 +1,2 @@ +# Used by tools/wiki unless it is run with "all": leaves out the translations to keep the build short. +exclude: ['wiki', 'tools', 'Gemfile', 'Gemfile.lock', 'docs/es', 'docs/cn'] diff --git a/_config.local.yml b/_config.local.yml new file mode 100644 index 000000000..9f5df12a0 --- /dev/null +++ b/_config.local.yml @@ -0,0 +1,9 @@ +# Local previews only (used by tools/wiki). +# _config.yml's plugins without jekyll-redirect-from, which breaks pages on Windows and macOS. +plugins: + - jekyll-feed + - jekyll-seo-tag + - jekyll-sitemap + - jekyll-avatar + - jemoji + - jekyll-mentions diff --git a/_config.yml b/_config.yml index 494ba9d04..03b34e3a2 100644 --- a/_config.yml +++ b/_config.yml @@ -137,7 +137,7 @@ plugins: - jemoji - jekyll-mentions -exclude: ['wiki'] +exclude: ['wiki', 'tools', 'Gemfile', 'Gemfile.lock'] # @@ -164,7 +164,7 @@ inc_before_header : inc_after_header : inc_before_tail : inc_after_tail : -inc_before_tools : +inc_before_tools : "azerothcore/languages.html" inc_after_tools : inc_before_page_list : "azerothcore/sidebar.html" diff --git a/_includes/azerothcore/languages.html b/_includes/azerothcore/languages.html new file mode 100644 index 000000000..f6450b58c --- /dev/null +++ b/_includes/azerothcore/languages.html @@ -0,0 +1,19 @@ +{% assign lang_prefix = page.url | slice: 0, 4 %} +{% if lang_prefix == "/es/" or lang_prefix == "/cn/" %} +{% assign lang_base = page.url | remove_first: lang_prefix %} +{% assign lang_current = lang_prefix | remove: "/" %} +{% else %} +{% assign lang_base = page.url | remove_first: "/" %} +{% assign lang_current = "en" %} +{% endif %} +{% assign lang_en_url = "/" | append: lang_base %} +{% assign lang_es_url = "/es/" | append: lang_base %} +{% assign lang_cn_url = "/cn/" | append: lang_base %} +{% assign lang_en_page = site.pages | where: "url", lang_en_url | first %} +{% assign lang_es_page = site.pages | where: "url", lang_es_url | first %} +{% assign lang_cn_page = site.pages | where: "url", lang_cn_url | first %} +
+ {% if lang_en_page %}:gb: English{% else %}:gb: English{% endif %} + {% if lang_es_page %}:es: Español{% else %}:es: Español{% endif %} + {% if lang_cn_page %}:cn: 简体中文{% else %}:cn: 简体中文{% endif %} +
diff --git a/_includes/azerothcore/sidebar.html b/_includes/azerothcore/sidebar.html index e71252d1f..cd52ee11f 100644 --- a/_includes/azerothcore/sidebar.html +++ b/_includes/azerothcore/sidebar.html @@ -21,33 +21,88 @@ + + + + + diff --git a/_includes/git-wiki/components/action_btn/page_actions.html b/_includes/git-wiki/components/action_btn/page_actions.html new file mode 100644 index 000000000..bd1af74aa --- /dev/null +++ b/_includes/git-wiki/components/action_btn/page_actions.html @@ -0,0 +1,12 @@ +
+ {% assign tools_repo = site.github.repository_url %} + {% assign tools_branch = site.git_branch | escape %} + {% assign tools_path = page.path | escape %} + {% if site.disable_edit != true %} + Add new + Edit + Delete + {% endif %} + History + Source +
diff --git a/_includes/git-wiki/components/copyrights/copyrights.html b/_includes/git-wiki/components/copyrights/copyrights.html new file mode 100644 index 000000000..0c96aac37 --- /dev/null +++ b/_includes/git-wiki/components/copyrights/copyrights.html @@ -0,0 +1,7 @@ +
+

This project is maintained by AzerothCore

+

Hosted on GitHub Pages - Powered by Git-Wiki version: {{ version }}

+ {% if site.github.repository_url %} +

Currently being hosted from repo {{ site.github.repository_nwo }}

+ {% endif %} +
diff --git a/_layouts/git-wiki-404.html b/_layouts/git-wiki-404.html index 1f4a99748..84850533a 100644 --- a/_layouts/git-wiki-404.html +++ b/_layouts/git-wiki-404.html @@ -9,6 +9,21 @@ + + +