Skip to content

fix: internal tutorials on /tutorials landing page, lazy load ui#15616

Merged
pettinarip merged 13 commits into
devfrom
tutorials-fix
Jun 30, 2025
Merged

fix: internal tutorials on /tutorials landing page, lazy load ui#15616
pettinarip merged 13 commits into
devfrom
tutorials-fix

Conversation

@wackerow
Copy link
Copy Markdown
Member

@wackerow wackerow commented Jun 4, 2025

Description

  • Refactor /tutorials to SSR
  • Pre-commit hook to save output of ls public/content/developers/tutorials into a json data array of all available internal tutorials.
  • Refactor tutorials page to fetch tutorials from our publicly available /content/developers/tutorials/ path instead of attempting to have Netlify read from fs at build time.

Preview link

https://deploy-preview-15616--ethereumorg.netlify.app/en/developers/tutorials

Related Issue

Fixes internal tutorials not being loaded into list of tutorials on https://ethereum.org/en/developers/tutorials

@github-actions github-actions Bot added the config ⚙️ Changes to configuration files label Jun 4, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 4, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 0f4e482
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6861f9351d14770008c0ff07
😎 Deploy Preview https://deploy-preview-15616--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 42 (🔴 down 11 from production)
Accessibility: 95 (🟢 up 1 from production)
Best Practices: 91 (🔴 down 1 from production)
SEO: 99 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the tooling 🔧 Changes related to tooling of the project label Jun 6, 2025
wackerow added 2 commits June 24, 2025 09:36
Tutorials are publicly served at URL/content/developers/tutorials/<name>/index.md in production. Netlify to generate appropriate /tutorials landing page based on committed list of tutorials from local fs.
Quickly logs output of `ls` to .json file with list of available nested /tutorials folders
@github-actions github-actions Bot added the dependencies 📦 Changes related to project dependencies label Jun 24, 2025
@wackerow wackerow changed the title [debug] fix: tutorial availability to Netlify at build fix: internal tutorials on /tutorials landing page, lazy load ui Jun 24, 2025
@wackerow wackerow marked this pull request as ready for review June 24, 2025 23:07
wackerow added 2 commits June 24, 2025 19:21
avoids footer components flashing on larger screens.
Comment thread .husky/pre-commit Outdated
npx lint-staged No newline at end of file
npx lint-staged
pnpm update-tutorials
git add src/data/internalTutorials.json
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Im fine with the current solution but not this part. IMO this will affect the DX and encourage ppl to just skip these hooks.

I'd prefer to call this manually as part of the process of adding a new tutorial. We should update the docs to highlight this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agree with this approach! Will patch

@github-actions github-actions Bot added the documentation 📖 Change or add documentation label Jun 30, 2025
@pettinarip pettinarip merged commit d8bc2ff into dev Jun 30, 2025
7 checks passed
@pettinarip pettinarip deleted the tutorials-fix branch June 30, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config ⚙️ Changes to configuration files dependencies 📦 Changes related to project dependencies documentation 📖 Change or add documentation tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants