Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make npm package, npm start uses eleventy to render specs #91

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 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
3 changes: 3 additions & 0 deletions .eleventyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/_site
/specs-website
35 changes: 35 additions & 0 deletions .github/workflows/add-to-web3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: add to web3

permissions:
pull-requests: write

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
add-to-web3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- uses: web3-storage/add-to-web3@v3
id: w3up
with:
path_to_add: '_site'
proof: ${{ secrets.W3_PROOF }}
secret_key: ${{ secrets.W3_PRINCIPAL }}
- run: echo ${{ steps.w3up.outputs.cid }}
- run: echo ${{ steps.w3up.outputs.url }}
- uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
# added to web3

${{ steps.w3up.outputs.url }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.heroku
_site
/node_modules
16 changes: 16 additions & 0 deletions index.webc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suspect this needs more

  <meta charset="utf-8">

Or maybe the gateway isn't able to guess the mime type. Maybe needs .html extension.

Add-to-web3 is just calling w3 up.

w3-specs ⁂
</h1>
<section webc:for="item of collections.all" webc:if="item.fileSlug">
<h2 id="item.fileSlug">
<span @text="item.fileSlug"></span>
<a href="`#${item.fileSlug}`">§</a>
</h2>
<dl>
<dt>url</dt>
<dd>
<a :href="item.url"><span @text="item.url"></span></a>
</dd>
</dl>
</section>
Loading