diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.github/workflows/check-html-metadata.yaml b/.github/workflows/check-html-metadata.yaml new file mode 100644 index 0000000..e954d2a --- /dev/null +++ b/.github/workflows/check-html-metadata.yaml @@ -0,0 +1,112 @@ +name: Validate HTML Metadata on PRs + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + validate-metadata: + runs-on: ubuntu-latest + steps: + # Checkout the PR branch + - name: Checkout PR branch + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + - name: Validate all HTML files in the PR branch + id: validate + run: | + ERROR_MESSAGE="" + VALIDATION_PASSED=false + + # Find all HTML files in the public/submissions/ directory + HTML_FILES=$(find public/submissions -name "*.html" || true) + + # If no HTML files are found, skip validation + if [ -z "$HTML_FILES" ]; then + echo "No HTML files found in public/submissions/. Skipping validation." + exit 0 + else + echo "Validating the following HTML files:" + echo "$HTML_FILES" + fi + + # Loop through all HTML files and validate them + for file in $HTML_FILES; do + echo "Processing file: $file" + + # Check for tag + AUTHOR=$(grep -Poz '(?s)]*name=["'\'']author["'\''][^>]*>' "$file" || true) + if [ -z "$AUTHOR" ]; then + ERROR_MESSAGE+="File $file is missing tag.\n" + fi + + # Check for
+ This is a sample project submission for testing. To ensure your project + is published correctly, make sure to include the following in your + submission HTML file: +
++ Join fellow W3C attendees for a fun and fast-paced HTML/CSS challenge! + Test your coding skills, and compete for nerdy prizes. +
++ This hackathon is open to everyone attending TPAC in person. Enjoy hot + snacks, meet new people, and show off your creativity in this relaxed + evening event. +
+Don’t miss out — space is limited, so register early!
++ This fun and relaxed evening will feature an HTML/CSS challenge where + participants can test their coding skills & creativity, enjoy some + snacks, and compete for nerdy prizes. +
++ Whether you’re a seasoned web developer or just starting out, all + skill levels are welcome. We’ve got limited space for 30 participants, + so be sure to sign up early to secure your spot. +
++ Date and Time: Tuesday, September 24th, from 8:30 PM + to 10:30 PM. +
++ Location: Hilton Anaheim, Huntington, Concourse + level, 4th floor +
++ This hackathon was created to encourage innovation and creativity + using HTML and CSS in a friendly competition format. +
++ Yes! We’ll have hot snacks available for everyone, but it won’t be a + full dinner. Make sure to grab a bite beforehand if you’re hungry! +
++ Participation is open to in-person attendees at the W3C TPAC event + in LA. If you’re here, you’re welcome to join! +
++ The project is a surprise! But we can tell you that it’ll be based + on HTML and CSS, and you’ll have about an hour to work on it. You + can work solo or with a partner – your choice! +
++ We will be using GitHub for project submissions. The repo link will + be provided soon. +
++ We're keeping the prizes a secret for now, but we promise + they'll be nerdy and fun. Multiple winners will be selected + based on audience votes. +
++ You can register{" "} + + here + + , but please note it’s gated behind a W3C login. +
++ Make sure to have your favorite text editor ready and a GitHub + account to submit your project. +
++ Thank you to our sponsors for helping make this event possible by + providing snacks, drinks, and prizes! +
+