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

Website: Migrate to vitepress #6518

Closed
wants to merge 96 commits into from
Closed

Conversation

Pandapip1
Copy link
Member

@Pandapip1 Pandapip1 commented Feb 17, 2023

Preview (might be out of date): https://eips.pandapip1.com/

Closes #6483

TODO:

  • RSS Feeds
  • Replace Htmlproofer
  • Remove created field from preamble

Not necessary, nice to have:

  • Reuse component for listings
  • Search
  • PWA

Other Notable Changes

  • Remove HTMLProofer: we have two link checkers today: HTMLProofer and markdown-link-check. HTMLProofer checks links in the final rendered output, while markdown-link-check checks the pre-rendered markdown. Removing HTMLProofer will significantly speed up builds, but will have less complete coverage.
  • Remove github-pages health-check: the status of our DNS isn't really a CI issue.
  • Modify EIP-1: to include up-to-date editor information.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Feb 17, 2023
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Feb 17, 2023
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Feb 17, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Feb 17, 2023
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Feb 17, 2023
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Feb 17, 2023
Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

Some One larger questions:

  • Is it feasible to move any JS code that "does work" into a library, so we can run linters and formatters and such?

Comment on lines -58 to -59
- name: HTML Proofer
run: bundle exec htmlproofer ./_site --check-html --check-opengraph --report-missing-names --log-level=:debug --assume-extension --empty-alt-ignore --timeframe=6w --disable-external
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you're turning off the "check links in the final rendered output" (HTMLProofer) check, so we'd be relying on the markdown link checker entirely. Is my understanding correct, and is that what we want?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, since we want to remove all ruby stuff. If you want, I can put in a new action that runs htmlproofer against the built website.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I'm sure there's a better option than htmlproofer if we're moving away from Ruby.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/deploy.yml Show resolved Hide resolved
.vitepress/config.js Outdated Show resolved Hide resolved
const eips = Promise.all(fs.readdirSync('./EIPS/').map(async file => {
let eipContent = fs.readFileSync(`./EIPS/${file}`, 'utf8');
let eipData = grayMatter(eipContent);
let lastStatusChange = new Date((await git.raw(['blame', `EIPS/${file}`])).split('\n').filter(line => line.match(/status:/gi))?.pop()?.match(/(?<=\s)\d+-\d+-\d+/g)?.pop());
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this library automatically add --porcelain? If not, I'd very much recommend using it, or maybe even --line-porcelain.


I know we disallow colons in eipw, but if we change that, we should still expect this tool to work. I'd recommend using /^status:/gi as the regex in case someone puts something dumb in their title.

Copy link
Member Author

Choose a reason for hiding this comment

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

What is --porcelain?

Copy link
Contributor

Choose a reason for hiding this comment

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

git has two types of commands: plumbing and porcelain. Plumbing commands are low-level and are used to implement the higher level porcelain commands, while porcelain commands are made to interface with a human.

The --porcelain flag tells porcelain commands to output in a more stable and script friendly format.

Copy link
Member Author

Choose a reason for hiding this comment

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

I know we disallow colons in eipw, but if we change that, we should still expect this tool to work. I'd recommend using /^status:/gi as the regex in case someone puts something dumb in their title.

How does that break this line?

Copy link
Contributor

Choose a reason for hiding this comment

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

How does that break this line?

It might, it might not. I'm not sure 🤣 Those were two unrelated thoughts: use --porcelain, and separately, tighten the regex.

.vitepress/config.js Show resolved Hide resolved
.vitepress/config.js Outdated Show resolved Hide resolved
.vitepress/config.js Outdated Show resolved Hide resolved
.vitepress/feeds.js Outdated Show resolved Hide resolved
assets/website/html_code.html Outdated Show resolved Hide resolved
@eth-bot
Copy link
Collaborator

eth-bot commented May 14, 2023

🛑 eip-review-bot failed for an unknown reason. Please see logs for more details, and report this issue at the eip-review-bot repository.

@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels May 15, 2023
@github-actions
Copy link

The commit 67a6a88 (as a parent of a8de4c9) contains errors.
Please inspect the Run Summary for details.

@xinbenlv
Copy link
Contributor

xinbenlv commented Jun 5, 2023

I like the site a lot. And I don't think Vitepress / HTML is a fair comparison here, probably we are comparing Jekyll vs Vue here..

Anyway, I've redirected eips.ercref.org to https://eips.pandapip1.com/ and will start using it for myself.

@Pandapip1 if you are open to it, we could setup eips.ercref.org or find a proper first level domain for it?

As much as we like to have (evm) client diversity, I've also been a big fan to support dApp diversity.

@lightclient
Copy link
Member

Vitepress is still in beta so we probably shouldn't be relying on it. I also don't think we should be making the site more complicated. I would rather we focus on making it simpler with less javascript. We don't need complex frontend frameworks to show EIPs.

@SamWilsn
Copy link
Contributor

SamWilsn commented Jun 5, 2023

I would rather we focus on making it simpler with less javascript. We don't need complex frontend frameworks to show EIPs.

Very much agreed. I don't know anything about Vue or Vitepress, and I—perhaps naively—assumed this was all executed during the compilation step.

Search, filtering, and any tooltips will likely need to be client-side, however.

@xinbenlv
Copy link
Contributor

xinbenlv commented Jun 5, 2023

@lightclient @SamWilsn

It's ok if you feel that this site is not ready to be used for the canonical eips.ethereum.org if there are concerns.

I am in support for this site to be its stand alone to support the EIP/ERC ecosystem.

@lightclient
Copy link
Member

lightclient commented Jun 5, 2023

That's fine, but in that case it should live in a different repo and this PR closed.

@xinbenlv
Copy link
Contributor

xinbenlv commented Jun 5, 2023

@Pandapip1 are you ok if this is a stand alone site? I think that reduces the friction for your beautifully designed site to be adopted sooner. And we can keep adding features to it.

@Pandapip1
Copy link
Member Author

Pandapip1 commented Jun 21, 2023

Very much agreed. I don't know anything about Vue or Vitepress, and I—perhaps naively—assumed this was all executed during the compilation step.

This is all executed during the compilation step, minus the searching which is done using a little bit of client-side JS, and some minor styling (tooltips, also with client-side JS).

@SamWilsn
Copy link
Contributor

SamWilsn commented Jun 26, 2023

This is all executed during the compilation step, minus the searching which is done using a little bit of client-side JS, and some minor styling (tooltips, also with client-side JS).

Great! That takes care of my trepidation about this.


My outstanding concerns:

  • Can we move any code that "does work" (as opposed to code that "configures") into a library with appropriate linters and code formatters?
  • Use --porcelain for git commands that accept it.

@lightclient Would I be correct in saying your only remaining objections are:

  • JavaScript vs. Ruby
  • vitepress 1.0 is still in beta

@Pandapip1
Copy link
Member Author

Closing since I've forked these changes to a separate repo. If we want to implement this, the website will be in a seperate repo.

https://eip.info is an automatically updated but improved version of these changes.

@github-actions
Copy link

There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the w-stale Waiting on activity label Aug 10, 2023
@Pandapip1
Copy link
Member Author

It appears I forgot to close.

@Pandapip1 Pandapip1 closed this Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
w-ci Waiting on CI to pass w-stale Waiting on activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Stagnant and Withdrawn EIPs less visible
6 participants