diff --git a/.github/scripts/check_permalinks.py b/.github/scripts/check_permalinks.py deleted file mode 100644 index 2918b8a..0000000 --- a/.github/scripts/check_permalinks.py +++ /dev/null @@ -1,85 +0,0 @@ -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/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index c0214de..0000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,19 +0,0 @@ -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/Gemfile.lock b/Gemfile.lock index 3fe8196..79660ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -262,6 +262,10 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) + sassc (2.4.0) + ffi (~> 1.9) + sassc (2.4.0-x64-mingw32) + ffi (~> 1.9) sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) @@ -289,6 +293,7 @@ PLATFORMS DEPENDENCIES github-pages + sassc wdm (>= 0.1.0) webrick diff --git a/_config.yml b/_config.yml index 0b01b31..a0bede6 100644 --- a/_config.yml +++ b/_config.yml @@ -45,7 +45,7 @@ feedback: true # If commented, will use material hat theme # logo: "assets/img/logo/SRCC-square-red.png" logo_pixels: 34 -color: "#161b22" +color: "#2b3035" # color: "#8c1515" # primary color for header, buttons # Build settings diff --git a/_sass/extras.scss b/_sass/extras.scss index 60ae05a..66eb701 100644 --- a/_sass/extras.scss +++ b/_sass/extras.scss @@ -18,7 +18,7 @@ body { line-height: 1.5; color: #c9d1d9; text-align: left; - background-color: #0d1117 + background-color: #212529 } img { diff --git a/pages/index.md b/pages/index.md index a9b7d79..285f38b 100644 --- a/pages/index.md +++ b/pages/index.md @@ -3,7 +3,10 @@ layout: page permalink: / --- -geyser logo +
+ geyser logo +
+
# GeyserMC Wiki