diff --git a/.circleci/circle_urls.sh b/.circleci/circle_urls.sh deleted file mode 100644 index 22729ae..0000000 --- a/.circleci/circle_urls.sh +++ /dev/null @@ -1,4 +0,0 @@ -REPO_ID=$(curl https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} | jq --raw-output '.id') -echo "Repo ID is ${REPO_ID}" -BASEURL=https://${CIRCLE_BUILD_NUM}-${REPO_ID}-gh.circle-artifacts.com/0/${CIRCLE_PROJECT_REPONAME} -sed -i "26 s,.*,baseurl: $BASEURL,g" "_config.yml" diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6a798b8..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: 2.1 - -workflows: - version: 2 - - # The build workflow will build a preview for the site, intended for PRs - build: - jobs: - - build-site: - filters: - branches: - ignore: - -build_jekyll: &build_jekyll - name: Jekyll Build - command: | - echo "Building RSE Blog for Preview" - cp ~/repo/.circleci/circle_urls.sh ~/repo/circle_urls.sh - cd ~/repo - chmod u+x circle_urls.sh - bash circle_urls.sh - bundle exec jekyll build - -jobs: - build-site: - docker: - - image: circleci/ruby:2.4.1 - working_directory: ~/repo - environment: - - JEKYLL_ENV: production - - NOKOGIRI_USE_SYSTEM_LIBRARIES: true - - BUNDLE_PATH: ~/repo/vendor/bundle - steps: - - checkout - - restore_cache: - keys: - - rubygems-v1 - - run: - name: Bundle Install - command: | - cd ~/repo - bundle check || bundle install - - save_cache: - key: rubygems-v1 - paths: - - vendor/bundle - - run: *build_jekyll - - store_artifacts: - path: ~/repo/_site - destination: GeyserDocs diff --git a/.github/scripts/check_permalinks.py b/.github/scripts/check_permalinks.py new file mode 100644 index 0000000..ff83004 --- /dev/null +++ b/.github/scripts/check_permalinks.py @@ -0,0 +1,85 @@ +import glob, os, sys +from collections import OrderedDict + +hadError = False + +# _escape and _error_workflow_command taken from https://github.com/utgwkk/pytest-github-actions-annotate-failures/blob/main/pytest_github_actions_annotate_failures/plugin.py +def _escape(s): + return s.replace("%", "%25").replace("\r", "%0D").replace("\n", "%0A") + +def _error_workflow_command(filesystempath, lineno, longrepr): + # Build collection of arguments. Ordering is strict for easy testing + details_dict = OrderedDict() + details_dict["file"] = filesystempath + if lineno is not None: + details_dict["line"] = lineno + + details = ",".join("{}={}".format(k, v) for k, v in details_dict.items()) + + if longrepr is None: + return "\n::error {}".format(details) + else: + longrepr = _escape(longrepr) + return "\n::error {}::{}".format(details, longrepr) + + +# Load toc but all stripped +toc = open('./_data/toc.yml', 'r', encoding='utf-8') +tocLines = toc.readlines() +toc.close() +tocContents = '' +for tocLine in tocLines: + tocContents += tocLine.replace('- ', '').strip() + '\n' + +# Check the permalinks +directory = './docs/' +files = glob.glob(os.path.join(directory, '**/*.md'), recursive=True) +for file in files: + contents = open(file, 'r', encoding='utf-8') + lines = contents.readlines() + contents.close() + + lineNo = 0 + for line in lines: + lineNo += 1 + + # End of header? + if (line == '---' and lineNo != 1): + break + + if (line.startswith('permalink:')): + url = line.replace('permalink:', '').strip() + wantedUrl = '/' + file.replace(os.path.sep, '/').replace(directory, '').replace('.md', '/') + + # Special file cleanup + wantedUrl = wantedUrl.replace('index/', '') + wantedUrl = wantedUrl.replace('root/', '') + + errorFileName = file + + # try to convert to absolute path in GitHub Actions + # from https://github.com/utgwkk/pytest-github-actions-annotate-failures/blob/main/pytest_github_actions_annotate_failures/plugin.py#L38-L50 + workspace = os.environ.get("GITHUB_WORKSPACE") + if workspace: + full_path = os.path.abspath(file) + try: + rel_path = os.path.relpath(full_path, workspace) + except ValueError: + # os.path.relpath() will raise ValueError on Windows + # when full_path and workspace have different mount points. + # https://github.com/utgwkk/pytest-github-actions-annotate-failures/issues/20 + rel_path = errorFileName + if not rel_path.startswith(".."): + errorFileName = rel_path + + # Check if the perma link it correct + if (url != wantedUrl): + hadError = True + print(_error_workflow_command(errorFileName, lineNo, "Permalink does not match filename! Should be " + wantedUrl), file=sys.stderr) + + # Check toc + if (wantedUrl != '/' and not (f"url: \"" + url[1:] + "\"" in tocContents)): + hadError = True + print(_error_workflow_command(errorFileName, lineNo, "Permalink not in toc.yml!"), file=sys.stderr) + +sys.exit(1 if hadError else 0) diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index dc90e5a..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..c0214de --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,19 @@ +name: Check PR + +on: pull_request + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo content + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Check permalinks + run: python .github/scripts/check_permalinks.py diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/docsy-jekyll.iml b/.idea/docsy-jekyll.iml deleted file mode 100644 index d6ebd48..0000000 --- a/.idea/docsy-jekyll.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 31f76f1..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 6657502..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,32 +0,0 @@ -# Changelog - -This is a manually generated log to track changes to the repository for each release. -Each section should include general headers such as **Implemented enhancements** -and **Merged pull requests**. All closed issued and bug fixes should be -represented by the pull requests that fixed them. -Critical items to know are: - - - renamed commands - - deprecated / removed commands - - changed defaults - - backward incompatible changes - - migration guidance - - changed behaviour - -## [master](https://github.com/vsoch/docsy-jekyll/tree/master) - - adding more verbose example for subfolders (0.0.24) - - sidebar fix to support multiple top level menus (0.0.23) - - added support for github_branch (default 'master') in config (0.0.22) - - adding support in footer to icon and link to linkedin url (0.0.21) - - updating repository with copyright notice, google analytics bug fix (0.0.2) - - fixing link to repository in about.md (0.0.19) - - use jquery locally, in case that jquery is unreachable in some places (0.0.18) - - hiding sidebar links to reflect parent functionality (0.0.17) - - adding breadcrumb link to documentation root (0.0.16) - - bug with link in top breadcrumb (404) missing baseurl (0.0.15) - - bug that news items (posts) don't render in search (0.0.14) - - minimum width of 150px for top right site name (0.0.13) - - tags page and option to link to it from post/docs tags (0.0.12) - - adding search endpoint tags to docs (0.0.11) - - adding site.url to config, making links in readme absolute (0.0.1) - - start of theme (0.0.0) diff --git a/Gemfile b/Gemfile index d1cfaf3..bb5cfc8 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ ruby RUBY_VERSION # If you want to use GitHub Pages, remove the "gem "jekyll"" above and # uncomment the line below. To upgrade, run `bundle update github-pages`. -gem "master", group: :jekyll_plugins +gem "github-pages", group: :jekyll_plugins # If you have any plugins, put them here! # group :jekyll_plugins do diff --git a/VERSION b/VERSION deleted file mode 100644 index b056f41..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.0.24 diff --git a/_config.yml b/_config.yml index d88422a..ac8c2ad 100644 --- a/_config.yml +++ b/_config.yml @@ -23,21 +23,19 @@ description: > # this means to ignore newlines until "baseurl:" Google search results) and in your feed.xml site description. # Add your baseurl here (your repository) but DO NOT CHANGE THE LINE NUMBER without editing .circleci/circle_urls.sh -baseurl: "/GeyserDocs" # the subpath of your site, e.g. /blog +baseurl: "" # the subpath of your site, e.g. /blog # This is mostly for testing -url: "https://vsoch.github.io" # the base hostname & protocol for your site +url: "https://docs.geysermc.org" # the base hostname & protocol for your site # Social (First three Required) -repo: "https://github.com/Jens-Co/GeyserDocs" -github_user: "Jens-Co" +repo: "https://github.com/GeyserMC/GeyserDocs" +github_user: "GeyserMC" github_repo: "GeyserDocs" github_branch: "master" # Optional -twitter: vsoch -linkedin: vsochat -dockerhub: vanessa +twitter: geyser_mc # Should there be feedback buttons at the bottom of pages? feedback: true @@ -78,19 +76,7 @@ collections: # Defaults defaults: - scope: - path: "_docs" - type: "docs" - values: - layout: page - - - scope: path: "" type: "pages" values: layout: "page" - - - scope: - path: "posts" - type: "posts" - values: - layout: "post" diff --git a/_data/toc.yml b/_data/toc.yml index f26294c..e12f967 100644 --- a/_data/toc.yml +++ b/_data/toc.yml @@ -1,92 +1,84 @@ - title: Geyser Documentation - url: "geyser/Geyser" + url: "geyser/" links: - title: "Geyser Setup" - url: "geyser/GeyserSetup" + url: "geyser/setup/" children: - - title: prerequisites - url: "geyser/GeyserSetup#prerequisites" - - title: plugin-setup - url: "geyser/GeyserSetup#plugin-setup" - - title: bungeecordvelocity-setup - url: "geyser/GeyserSetup#bungeecordvelocity-setup" - - title: standalone-setup - url: "geyser/GeyserSetup#standalone-setup" - - title: gui-setup-recommended - url: "geyser/GeyserSetup#gui-setup-recommended" - - title: console-setup - url: "geyser/GeyserSetup#console-setup" - - title: standalone-setup-geyser-and-floodgate-are-not-on-the-same-server - url: "geyser/GeyserSetup#standalone-setup-geyser-and-floodgate-are-not-on-the-same-server" - - title: port-forwarding - url: "geyser/GeyserSetup#port-forwarding" - - title: termux-android - url: "geyser/GeyserSetup#termux-android" - - title: newterm-2-ios - url: "geyser/GeyserSetup#newterm-2-ios" - - title: setup-videos - url: "geyser/GeyserSetup#setup-videos" + - title: Plugin Setup + url: "geyser/setup/#plugin-setup" + - title: Standalone Setup + url: "geyser/setup/#standalone-setup" + - title: Termux (Android) + url: "geyser/setup/#termux-android" + - title: NewTerm 2 (iOS) + url: "geyser/setup/#newterm-2-ios" + - title: Videos + url: "geyser/setup/#setup-videos" - title: FAQ - url: geyser/FAQ + url: "geyser/faq/" - title: Common Issues - url: geyser/Common-Issues + url: "geyser/common-issues/" children: - - title: Fixing Unable to Connect to World - url: "geyser/Common-Issues/#see-here-for-fixing-unable-to-connect-to-world-with-no-console-errors" + - title: Fixing 'Unable to Connect to World' + url: "geyser/common-issues/#see-here-for-fixing-unable-to-connect-to-world-with-no-console-errors" - title: Understanding the Config - url: geyser/Understanding-the-Config + url: "geyser/understanding-the-config/" - title: Standalone Command Line Arguments - url: geyser/Standalone-Command-Line-Arguments + url: "geyser/standalone-command-line-arguments/" + - title: Creating a Startup Script + url: "geyser/creating-a-startup-script/" - title: Commands - url: geyser/Commands + url: "geyser/commands/" - title: Supported Hosting Providers - url: geyser/Supported-Hosting-Providers + url: "geyser/supported-hosting-providers/" + - title: Using Geyser with Consoles + url: "geyser/using-geyser-with-consoles/" - title: Anticheat Compatibility - url: geyser/Anticheat-Compatibility + url: "geyser/anticheat-compatibility/" - title: Using geyser or floodgate as a dependency - url: geyser/Using-Geyser-or-Floodgate-as-a-dependency + url: "geyser/using-geyser-or-floodgate-as-a-dependency/" - title: Current Limitations - url: geyser/Current-Limitations + url: "geyser/current-limitations/" - title: Floodgate Documentation - url: "floodgate/Floodgate" + url: "floodgate/" links: - - title: "Floodgate Setup" - url: "floodgate/FloodgateSetup" + - title: "Setup" + url: "floodgate/setup/" - title: "Issues" - url: "floodgate/Issues" + url: "floodgate/issues/" - title: "Features" - url: "floodgate/Features" + url: "floodgate/features/" children: - title: Whitelist command - url: "floodgate/Features#whitelist-command" + url: "floodgate/features/#whitelist-command" - title: Global Api - url: "floodgate/Features#what-is-the-global-api" + url: "floodgate/features/#what-is-the-global-api" - title: Global Linking - url: "floodgate/Features#what-is-global-linking" + url: "floodgate/features/#what-is-global-linking" - title: Local Linking - url: "floodgate/Features#local-linking" + url: "floodgate/features/#local-linking" - title: Skin Uploading - url: "floodgate/Features#what-is-skin-uploading" - - title: "FloodgateAPI" - url: "floodgate/FloodgateApi" + url: "floodgate/features/#what-is-skin-uploading" + - title: "Floodgate API" + url: "floodgate/api/" - title: "FloodgatePlayer" - url: "floodgate/FloodgatePlayer" + url: "floodgate/player/" - title: "Forms and Cumulus" - url: "floodgate/Forms" + url: "floodgate/forms/" - title: "Commands" - url: "floodgate/Commands" + url: "floodgate/commands/" - title: Other - url: "other/Other" + url: "other/" links: - title: "GeyserOptionalPack" - url: "other/GeyserOptionalPack" + url: "other/geyseroptionalpack/" - title: "GeyserConnect" - url: "other/GeyserConnect" + url: "other/geyserconnect/" - title: "Geyser-Fabric" - url: "other/Geyser-Fabric" + url: "other/geyser-fabric/" - title: "Test Server" - url: "other/TestServer" + url: "other/test-server/" - title: "Developer Guide" - url: "other/DeveloperGuide" + url: "other/developer-guide/" - title: "Community Geyser Projects" - url: "other/Community-Geyser-Projects" + url: "other/community-geyser-projects/" diff --git a/_includes/footer.html b/_includes/footer.html index 5745163..a801a32 100755 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -31,7 +31,6 @@
© {{ 'now' | date: "%Y" }} {{ site.author }} All Rights Reserved {% if site.privacy %}Privacy Policy{% endif %} -

About Docsy

diff --git a/_includes/header.html b/_includes/header.html index 9d40c05..f573318 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,7 @@