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 rework (duplicated) #2171

Closed
wants to merge 9 commits into from
Closed

Website rework (duplicated) #2171

wants to merge 9 commits into from

Conversation

lumi2021
Copy link
Contributor

@lumi2021 lumi2021 commented May 9, 2024

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 👉👈😖

@lumi2021 lumi2021 requested a review from a team as a code owner May 9, 2024 00:55
@Perksey
Copy link
Member

Perksey commented May 26, 2024

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
Copy link
Member

Perksey commented May 26, 2024

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

@Perksey
Copy link
Member

Perksey commented May 26, 2024

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
Copy link
Member

Perksey commented May 26, 2024

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.

Copy link
Member

@Perksey Perksey left a comment

Choose a reason for hiding this comment

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

As above

@lumi2021
Copy link
Contributor Author

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
Copy link
Contributor Author

lumi2021 commented May 28, 2024

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
Copy link
Contributor Author

lumi2021 commented Jun 24, 2024

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
Copy link
Member

Perksey commented Jun 24, 2024

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

@lumi2021
Copy link
Contributor Author

lumi2021 commented Jun 26, 2024

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
Copy link
Contributor Author

@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?

@Perksey
Copy link
Member

Perksey commented Jul 7, 2024

Wasn't quite what I was after

dylan@Mac Silk.NET % ./build.sh website 
GNU bash, version 5.2.26(1)-release (aarch64-apple-darwin23.2.0)
Microsoft (R) .NET Core SDK version 7.0.404
15:37:56 [WRN] Solution /Users/dylan/Downloads/Silk.NET/Silk.NET.sln has active build configurations for the build project.
Either enable SuppressBuildProjectCheck on Build.OriginalSolution or remove the following entries from the solution file:
  - {B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Debug|Any CPU.Build.0 = Debug|Any CPU
  - {B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Debug|x64.Build.0 = Debug|Any CPU
  - {B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Debug|x86.Build.0 = Debug|Any CPU
  - {B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Release|x64.Build.0 = Release|Any CPU
  - {B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Release|x86.Build.0 = Release|Any CPU
​
███╗   ██╗██╗   ██╗██╗  ██╗███████╗
████╗  ██║██║   ██║██║ ██╔╝██╔════╝
██╔██╗ ██║██║   ██║█████╔╝ █████╗  
██║╚██╗██║██║   ██║██╔═██╗ ██╔══╝  
██║ ╚████║╚██████╔╝██║  ██╗███████╗
╚═╝  ╚═══╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝
​
NUKE Execution Engine version 6.3.0 (OSX,.NETCoreApp,Version=v7.0)
​
Target with name 'website' does not exist. Available targets are:
  - Assimp
  - BuildLibSilkDroid
  - Clean
  - Compile
  - DeclareApi
  - Dxvk
  - EnsureApiDeclared
  - FullCompile
  - FullPack
  - FullPushToNuGet
  - GLFW
  - MoltenVK
  - OpenALSoft
  - Pack
  - Prerequisites
  - PushToNuGet
  - RegenerateBindings
  - Restore
  - SDL2
  - Shaderc
  - ShipApi
  - SignPackages
  - Sln
  - SPIRVCross
  - SPIRVReflect
  - SwiftShader
  - Test
  - ValidateSolution
  - Vkd3d
  - VulkanLoader
  - Wgpu

And your non-NUKE script (which wasn't what was asked for) doesn't work:

dylan@Mac website % ./build.sh
GNU bash, version 5.2.26(1)-release (aarch64-apple-darwin23.2.0)
./build.sh: line 16: syntax error near unexpected token `}'

I did manage to build it and will base my review on that, but note that in order to be accepted the website GitHub workflow needs to be able to run (test it on your own fork) and be able to run in GitHub Pages. Will review now.

Comment on lines +261 to +277
public readonly record struct ConnectionEvent(IInputDevice Device, DateTimeOffset? Timestamp, bool IsConnected);
public readonly record struct KeyDownEvent(IKeyboard Keyboard, DateTimeOffset? Timestamp, Key Key, bool IsRepeat);
public readonly record struct KeyUpEvent(IKeyboard Keyboard, DateTimeOffset? Timestamp, Key Key);
public readonly record struct KeyCharEvent(IKeyboard Keyboard, DateTimeOffset? Timestamp, char Character);
public readonly record struct MouseDownEvent(IMouse Mouse, DateTimeOffset? Timestamp, Vector2 Position, MouseButton Button);
public readonly record struct MouseUpEvent(IMouse Mouse, DateTimeOffset? Timestamp, Vector2 Position, MouseButton Button);
public readonly record struct MouseMoveEvent(IMouse Mouse, DateTimeOffset? Timestamp, Vector2 Position, Vector2 Delta);
public readonly record struct MouseScrollEvent(IMouse Mouse, DateTimeOffset? Timestamp, Vector2 Position, Vector2 WheelPosition, Vector2 Delta);
public readonly record struct MouseClickEvent(IMouse Mouse, DateTimeOffset? Timestamp, Vector2 Position, MouseButton Button);
public readonly record struct JoystickDownEvent(IJoystick Joystick, DateTimeOffset? Timestamp, JoystickButton Button);
public readonly record struct JoystickUpEvent(IJoystick Joystick, DateTimeOffset? Timestamp, JoystickButton Button);
public readonly record struct JoystickHatMoveEvent(IJoystick Joystick, DateTimeOffset? Timestamp, Vector2 Value, Vector2 Delta);
public readonly record struct JoystickAxisMoveEvent(IJoystick Joystick, DateTimeOffset? Timestamp, int Axis, float Value, float Delta);
public readonly record struct GamepadDownEvent(IGamepad Gamepad, DateTimeOffset? Timestamp, JoystickButton Button);
public readonly record struct GamepadUpEvent(IGamepad Gamepad, DateTimeOffset? Timestamp, JoystickButton Button);
public readonly record struct GamepadThumbstickMoveEvent(IJoystick Joystick, DateTimeOffset? Timestamp, Vector2 Value, Vector2 Delta);
public readonly record struct GamepadTriggerMoveEvent(IJoystick Joystick, DateTimeOffset? Timestamp, int Axis, float Value, float Delta);
Copy link
Member

Choose a reason for hiding this comment

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

Why has this changed in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea...
will try to understand and revert

Comment on lines +1 to +7
:; set -eo pipefail
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
:; ${SCRIPT_DIR}/build.sh "$@"
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
Copy link
Member

Choose a reason for hiding this comment

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

Remove these scripts, automation should be in NUKE instead. Don't want loads of random build scripts in multiple places in the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to make the website more scope closed, but if you don't want it's fine, i will implement the NUKE script in the root

Comment on lines +1 to +5
# HLU Tutorials

We're still working on our Windowing & Input High Level Utilities (HLU) tutorials!

You can get the gist of how HLU works by reading through the [OpenGL tutorials](/docs/opengl/helloWindow)
Copy link
Member

Choose a reason for hiding this comment

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

Docusaurus seemingly has the ability to have a parent have content in its own right e.g. see https://docusaurus.io/docs/migration and how when you click on "Upgrading" it has its own content, with the specific guides as pages in their own right.

This is meant to be a landing page i.e. when I click on "HLU" I want this page to show up, I don't want this to be its own entry in the menu bar.

This way we can likely preserve the URL, too i.e. this page is docs/hlu

@@ -0,0 +1,5 @@
# HLU Tutorials
Copy link
Member

Choose a reason for hiding this comment

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

Can you change this directory name to have no capitals.

Comment on lines +17 to +19
**Ensure you have the [Microsoft Visual C++ Redisributables](https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170) installed!**

**Ensure the underlying API is present on the system**
Copy link
Member

Choose a reason for hiding this comment

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

Why has this been reformatted?

<img src={'img/xplatpromo.png'} draggable={"false"}></img>

<div className={styles.item}>
<span><FontAwesomeIcon icon={faTrowelBricks}></FontAwesomeIcon></span>
Copy link
Member

Choose a reason for hiding this comment

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

Can this be a cog icon please

Comment on lines +24 to +27

<p>Active and fun community;</p>
<p>Quick answers and <span className={styles.channelLink}>help</span> channel;</p>
<p>News and announcements</p>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<p>Active and fun community;</p>
<p>Quick answers and <span className={styles.channelLink}>help</span> channel;</p>
<p>News and announcements</p>
<p>Active community</p>
<p>Easy & quick answers to questions</p>
<p>News and announcements</p>

Comment on lines +58 to +68
<div className={styles.content}>
<p>Contribute with:</p>
<div className={styles.list}>
<p>💡 ideas;</p>
<p>⏫ suggestions;</p>
<p>🐞 bug reports;</p>
</div>
<p>
And the future of Silk.NET directly with the
.NET team!
</p>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<div className={styles.content}>
<p>Contribute with:</p>
<div className={styles.list}>
<p>💡 ideas;</p>
<p>⏫ suggestions;</p>
<p>🐞 bug reports;</p>
</div>
<p>
And the future of Silk.NET directly with the
.NET team!
</p>
<div className={styles.content}>
<p>
Get answers to your questions, and participate in the development by discussing and/or contributing improvements.
</p>

(or something along those lines)


favicon: 'img/favicon.ico',

organizationName: 'dotnet comunity',
Copy link
Member

Choose a reason for hiding this comment

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

.NET Foundation

Comment on lines +8 to +15
html[data-theme='dark'] {
--ifm-background-color: #3B4252;
--ifm-hero-background-color: #2E3440;
}
html[data-theme='light'] {
--ifm-background-color: white;
--ifm-hero-background-color: whitesmoke;
}
Copy link
Member

Choose a reason for hiding this comment

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

If you're applying the Nord colour palette can you please do so consistently. Here are all of the colours (i.e. darker tones to use instead of the defaults to contrast against the background)

Also can you make sure we're using purple accents instead of the default green?

Copy link
Contributor Author

@lumi2021 lumi2021 Jul 8, 2024

Choose a reason for hiding this comment

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

i will try to replace all the green colors that i've missed

@Perksey
Copy link
Member

Perksey commented Jul 7, 2024

Oh also where has the miscellaneous section gone (and the FAQ link in the navbar) - can we add this back please

@lumi2021 lumi2021 closed this Jul 29, 2024
@lumi2021 lumi2021 changed the title Website rework Website rework (duplicated) Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants