dotnet / Silk.NET

The high-speed OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, WebGPU, and DirectX bindings library your mother warned you about.
https://dotnet.github.io/Silk.NET
MIT License
3.89k stars 378 forks source link

Website rework #2171

Open lumi2021 opened 1 month ago

lumi2021 commented 1 month ago

The Silk.NET website remade from scratch

As requested by Perksey, it now is build on Docusaurus. It style is completely made from scratch based on the current one (without templates this time 💀)

I'm sending only the source code. To generate the build folder just run npm run build. build/ isn't on .gitignore because i suppose this folder is required to serve the application.

As Docusaurus uses an routing system, it will generate 2 folders on build directory. an Client an an Server. I don't know how to solve the server problem and i expect another one can solve this issue (sry for delegate work).

Some links may and WILL broke, it's proposal because i don't know the right routes until the compilation and setup of the website. When everything is ok i will back on it and resolve these links.

Here, a link of the source code on stackblitz. As it have full compatibility with Docusaurus, it's just open and wait to see a working preview. Try to explore the entire site and test responsivities because some things can change.

unfortunately, Docusaurus uses git history information to set doc page's author, so I'm the author of everything now lol. It can be solved only if the respective authors do some changes on their .md files.

Any issues, questions or anything, pls comment here

Perksey-senpai pls accept my PR 👉👈😖

Perksey commented 1 month ago

Yeah I have no idea how to build this so I can't review it. Can you maybe add something to NUKE so I can just do ./build.sh website? This should help CI integration as well.

Perksey commented 1 month ago

Ah helps if I read, but yeah a NUKE job would be helpful.

Perksey commented 1 month ago

Build fails locally.


[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:53:19)
    at async /Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:64:9
    at async mapAsyncSequential (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
    at async Command.build (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
  [cause]: Error: Docusaurus found broken links!

  Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
  Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.

  It looks like some of the broken links we found appear in many pages of your site.
  Maybe those broken links appear on all pages through your site layout?
  We recommend that you check your theme configuration for such links (particularly, theme navbar and footer).
  Frequent broken links are linking to:
  - /Silk.NET/blog

  Exhaustive list of all broken links found:
  - Broken link on source page path = /Silk.NET/404.html:
     -> linking to /Silk.NET/blog
  - Broken link on source page path = /Silk.NET/docs/getStarted:
     -> linking to /Silk.NET/blog
  - Broken link on source page path = /Silk.NET/docs/HLU/HluTutorials:
     -> linking to /Silk.NET/blog
  - Broken link on source page path = /Silk.NET/docs/HLU/troubleshoting:
     -> linking to /Silk.NET/blog
  - Broken link on source page path = /Silk.NET/docs/opengl/helloQuad:
     -> linking to /Silk.NET/blog
     -> linking to ../sources/1.2.7-finished-setup.html (resolved as: /Silk.NET/docs/sources/1.2.7-finished-setup.html)
     -> linking to ../sources/1.2-final-result.html (resolved as: /Silk.NET/docs/sources/1.2-final-result.html)
  - Broken link on source page path = /Silk.NET/docs/opengl/helloTexture:
     -> linking to /Silk.NET/blog
     -> linking to ../sources/1.3-final-result.html (resolved as: /Silk.NET/docs/sources/1.3-final-result.html)
  - Broken link on source page path = /Silk.NET/docs/opengl/helloWindow:
     -> linking to /Silk.NET/blog
  - Broken link on source page path = /Silk.NET/:
     -> linking to /Silk.NET/blog

      at throwError (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/logger/lib/index.js:79:11)
      at reportBrokenLinks (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:242:47)
      at handleBrokenLinks (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:274:5)
      at executeBrokenLinksCheck (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:182:47)
      at /Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:136:66
      at Object.async (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/utils.js:36:47)
      at buildLocale (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:136:30)
      at async tryToBuildLocale (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:46:13)
      at async /Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:64:9
      at async mapAsyncSequential (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
      at async Command.build (/Users/dylan/Documents/Silk.NET/website/node_modules/@docusaurus/core/lib/commands/build.js:62:5)
}
Perksey commented 1 month ago

Btw can you make sure the URL paths are the same in the new site as the old site? i.e. each page is located at the same URL? Always frustrating when websites break this, and I try to avoid this where possible.

lumi2021 commented 1 month ago

Yeah I have no idea how to build this so I can't review it. Can you maybe add something to NUKE so I can just do ./build.sh website? This should help CI integration as well.

i will try to do it

lumi2021 commented 1 month ago

Btw can you make sure the URL paths are the same in the new site as the old site? i.e. each page is located at the same URL? Always frustrating when websites break this, and I try to avoid this where possible.

unfortunately I can't do it, as the old website was being made with static files https://domain/Silk.NET/index.html and docusaurus use routing https://domain/Silk.NET

but i can try match 100% the routes with the static files directories if they are still not matching

lumi2021 commented 1 week ago

Build fails locally. ... @Perksey

Rly sorry for the time gap, but now I'm back to review it. This is occurring because of an option on the ./docusaurus.config.js file, where a field called onBrokenLinks says that it's for abort the running and throws an error when a broken link is found. To fix this security behavior during running tests, just find the property and change the value to something that will not cause the compilation to be aborted, like ignore or anything different that what's setted rn. I'm on mobile so I can't give more clarified details, but you can find exactly what you need to do here https://docusaurus.io/docs/api/docusaurus-config#onBrokenLinks

Perksey commented 1 week ago

I am not interested in reviewing a PR where the reviewer has to do work to get it into a mergeable state.

lumi2021 commented 1 week ago

I am not interested in reviewing a PR where the reviewer has to do work to get it into a mergeable state. @Perksey

Sry, i will try to fix the conflicts

lumi2021 commented 1 week ago

@Perksey

All conflicts are fixed now Also I added the build commands. Idk if it's on the way that you wanted, but it's working

Also, do you already saw the website at runtime?