Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
id: cache-deps
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/site/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r site/requirements.txt
pip install -r scripts/requirements.txt

- name: Build site
run: python site/build_site.py
- name: Build scripts
run: python scripts/build_site.py
env:
GITHUB_PAGES_BASE_URL: ""

Expand All @@ -52,7 +52,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: "site/_site"
path: "scripts/_site"

deploy:
if: github.repository == 'XRPLF/XRPL-Standards'
Expand Down
47 changes: 44 additions & 3 deletions .github/workflows/validate-xls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,64 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/site/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r site/requirements.txt
pip install -r scripts/requirements.txt

- name: Validate XLS document parsing
run: |
echo "Running XLS document validation..."
python site/xls_parser.py
python scripts/xls_parser.py

- name: Report validation results
if: always()
run: |
echo "XLS validation completed"
echo "This pipeline validates that all XLS documents can be parsed correctly"
echo "If this fails, it indicates issues with XLS document formatting or metadata"

validate-amendment-template:
runs-on: ubuntu-latest
name: Validate Amendment Template Compliance

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch full history for git diff

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Cache Python dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt

- name: Validate Amendment template compliance
run: |
echo "Running Amendment template validation..."
python scripts/validate_amendment_template.py

- name: Report validation results
if: always()
run: |
echo "Amendment template validation completed"
echo "This validates that new/modified Amendment specs follow AMENDMENT_TEMPLATE.md"
echo "If this fails, check the error messages for missing sections or placeholders"
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions site/build_site.py → scripts/build_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ def build_site():
if category not in categories:
categories[category] = []
categories[category].append(doc)

# Generate category pages
category_template = env.get_template("category.html")
all_categories = [(cat, len(docs)) for cat, docs in sorted(categories.items())]

for category, category_docs in categories.items():
# Sort category documents by number in reverse order
category_docs.sort(key=lambda x: int(x.number), reverse=True)

category_html = category_template.render(
title=f"{category} XLS Standards",
category=category,
Expand All @@ -118,12 +118,12 @@ def build_site():
total_count=len(xls_docs),
base_url=".." if base_url == "." else base_url,
)

# Write category HTML file
category_file = site_dir / "category" / f"{category.lower()}.html"
with open(category_file, "w", encoding="utf-8") as f:
f.write(category_html)

print(f"Generated category page: {category_file}")

# Generate index page with category navigation
Expand All @@ -146,24 +146,24 @@ def build_site():
try:
with open(contributing_path, "r", encoding="utf-8") as f:
contributing_content = f.read()

# Convert markdown to HTML
contributing_html_content = convert_markdown_to_html(contributing_content)

# Render contribute page
contribute_template = env.get_template("contribute.html")
contribute_html = contribute_template.render(
title="Contributing to XLS Standards",
content=contributing_html_content,
base_url=base_url,
)

# Write contribute file
with open(site_dir / "contribute.html", "w", encoding="utf-8") as f:
f.write(contribute_html)

print(f"Generated contribute page from CONTRIBUTING.md")

except Exception as e:
print(f"Error generating contribute page: {e}")
else:
Expand Down
6 changes: 3 additions & 3 deletions site/requirements.txt → scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python dependencies for XLS Standards site generation and validation
#
#
# Core site generation dependencies
markdown>=3.4.4,<4.0.0 # Markdown to HTML conversion with extensions
jinja2>=3.1.2,<4.0.0 # HTML template engine
Expand All @@ -9,6 +9,6 @@ pyyaml>=6.0,<7.0 # YAML configuration parsing
# Additional dependencies for enhanced markdown processing
# Note: These are included automatically with markdown[extra] but listed for clarity
# - tables: GitHub-flavored markdown tables
# - codehilite: Syntax highlighting for code blocks
# - codehilite: Syntax highlighting for code blocks
# - toc: Table of contents generation
# - extra: Additional markdown extensions bundle
# - extra: Additional markdown extensions bundle
6 changes: 3 additions & 3 deletions site/templates/base.html → scripts/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--
<!--
Base HTML template for XLS Standards website

This template provides the common structure and styling for all pages:
- XRPL.org themed design with dark color scheme
- Work Sans typography matching official XRPL branding
- Work Sans typography matching official XRPL branding
- Responsive layout with header, main content, and footer
- Dynamic base URL support for GitHub Pages deployment
-->
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions site/templates/xls.html → scripts/templates/xls.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
<!--
Individual XLS document template

Displays a single XLS standard document with:
- Document metadata (number and status badge)
- Full rendered markdown content
Expand Down
Loading