Skip to content

feat(docussaurus): upgrade Docussaurus and document development procedures #11

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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

see7e
Copy link
Contributor

@see7e see7e commented Mar 22, 2025

Changes Summary

This PR refers to #9.
The first commit was a cherry-pick from the same commit (03377f6) made by Conrado. The other changes are listed below.

Removed

  • No need for docusaurus/blog/ as discussed in Slack, and as the existing text is not relevant to the project, it has been removed.
  • Removed docusaurus/README.md as it is already present information duplicated with another files like docs/howtos/documentation_development.md.
  • Removed docusaurus/package-lock.json as the local development should be done with yarn.
  • Removed unused static files.
  • Remove HomepageFeatures components as was only being imported and not used.

Added

  • Added docusaurus/docs/howtos/documentation_development.md as to give instructions on how to develop documentation.
  • Added docusaurus/docker.package.json to include the dependencies needed to build the containers.

Updated

  • Improved docusaurus/.dockerignore refenrencing the the other JS modules that are not needed when building the container.
  • Updated docusaurus/package.json to include the latest versions of the dependencies.
  • Included at docusaurus/Dockerfile the the new instructions to build the containers of Development and Production.
  • Improved index.js to include the new components and remove the unused ones.

Test Plan

Basic Docusaurus build tests

Additional Information

  • This change is backwards-breaking

Security Considerations

Meeting scheduled to 27/03/2025.

Copy link
Collaborator

@lucaaamaral lucaaamaral left a comment

Choose a reason for hiding this comment

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

The only thing I see necessary to restore the removed copyright and remove the CHANGELOG. Everything else seems ok.

@lucaaamaral lucaaamaral changed the title Chore: Review configurations, static files and folder structure feat(docussaurus): upgrade Docussaurus and document development procedures Mar 23, 2025
@lucaaamaral lucaaamaral linked an issue Mar 23, 2025 that may be closed by this pull request
@see7e see7e requested a review from lucaaamaral March 24, 2025 18:37
@lucaaamaral lucaaamaral force-pushed the chore/evaluate-conrado-pr branch from 670f346 to 5635f10 Compare March 25, 2025 14:01
@see7e
Copy link
Contributor Author

see7e commented Mar 28, 2025

Commenting just another task to be done in this PR: need to check the new configuration of docusaurus for the "current" version docs (probably readmes will have to be renamed)

Comment on lines 41 to 44
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we have this 'edit this page' pointing to this repository?

@lucaaamaral
Copy link
Collaborator

Let's bring CI here to be able to merge. I saw you have them done already.

@see7e
Copy link
Contributor Author

see7e commented Apr 3, 2025

Let's bring CI here to be able to merge. I saw you have them done already.

Done

cd docusaurus/docs
MODIFIED_DOCS=$(find . -type f \( -name "*.md" -o -name "*.mdx" \) ! -path "versioned_docs/*")
else
BASE_REF="${GITHUB_BASE_REF:-origin/main}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Set the variables that may be changed based on input at the beginning of the script so it is easy to spot and understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to use the extensions in an array need to construct the -name conditions dynamically, ill try to address to that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defined as global states (for now) is your proposition to define the vars in the jobs ENV and insert them in the script via the args?

CHECKED_FILES=$((CHECKED_FILES + 1))

filename=$(basename "$file")
expected_id=$(echo "$filename" | sed 's/\.[^.]*$//') # Remove extension
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use that to remove the extention: expected_id=$(basename "$file" .txt)

https://stackoverflow.com/questions/3362920/get-just-the-filename-from-a-path-in-a-bash-script

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is possible to add the regex in the basename command?

@see7e
Copy link
Contributor Author

see7e commented Apr 17, 2025

Regarding the broken link issue at the build process:
image

There's no nms/nms_organizations.md or nms/organizations.md file
image

Same happens at:

  • version-1.5.X-deploy_config_agw
  • version-1.6.X-deploy_config_agw

@see7e
Copy link
Contributor Author

see7e commented Apr 17, 2025

Other missing files:

  • docusaurus\versioned_docs\version-1.5.X\proposals\0_proposal-minutes.md
  • docusaurus\versioned_docs\version-1.6.X\proposals\0_proposal-minutes.md
  • docusaurus\versioned_docs\version-1.7.0\proposals\0_proposal-minutes.md
  • docusaurus\versioned_docs\version-1.8.0\proposals\0_proposal-minutes.md
  • docusaurus\versioned_docs\version-1.4.X\proposals\0_proposal-minutes.md

@see7e
Copy link
Contributor Author

see7e commented Apr 17, 2025

Current error log of Build process:

[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:78:15)
    at async C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:34:9
    ... 4 lines matching cause stack trace ...
    at async file:///C:/Users/User/Documents/prj/magma-documentation/docusaurus/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 {
  [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:
  - 0_proposal-minutes.md

  Exhaustive list of all broken links found:
  - Broken link on source page path = /docs/1.1.X/lte/version-1.1.X-config_agw:  
     -> linking to ../orc8r/deploy_intro.md (resolved as: /docs/1.1.X/orc8r/deploy_intro.md)
  - Broken link on source page path = /docs/1.1.X/lte/version-1.1.X-enodebd:     
     -> linking to ../orc8r/deploy_intro.md (resolved as: /docs/1.1.X/orc8r/deploy_intro.md)
  - Broken link on source page path = /docs/1.1.X/lte/version-1.1.X-pipelined:   
     -> linking to pipelined_tests.md (resolved as: /docs/1.1.X/lte/pipelined_tests.md)
  - Broken link on source page path = /docs/1.2.X/lte/version-1.2.X-config_agw:  
     -> linking to config_apn (resolved as: /docs/1.2.X/lte/config_apn)
  - Broken link on source page path = /docs/1.2.X/lte/version-1.2.X-pipelined:   
     -> linking to pipelined_tests.md (resolved as: /docs/1.2.X/lte/pipelined_tests.md)
  - Broken link on source page path = /docs/1.3.X/lte/version-1.3.X-config_agw:  
     -> linking to config_apn (resolved as: /docs/1.3.X/lte/config_apn)
  - Broken link on source page path = /docs/1.4.X/lte/version-1.4.X-config_agw:  
     -> linking to ../nms/organizations.md (resolved as: /docs/1.4.X/nms/organizations.md)
     -> linking to config_apn (resolved as: /docs/1.4.X/lte/config_apn)
  - Broken link on source page path = /docs/1.4.X/proposals/:
     -> linking to 0_proposal-minutes.md (resolved as: /docs/1.4.X/proposals/0_proposal-minutes.md)
  - Broken link on source page path = /docs/1.5.X/lte/version-1.5.X-deploy_config_agw:
     -> linking to ../nms/organizations.md (resolved as: /docs/1.5.X/nms/organizations.md)
     -> linking to deploy_config_apn (resolved as: /docs/1.5.X/lte/deploy_config_apn)
  - Broken link on source page path = /docs/1.5.X/lte/version-1.5.X-deploy_install:
     -> linking to deploy_install_ubuntu (resolved as: /docs/1.5.X/lte/deploy_install_ubuntu)
  - Broken link on source page path = /docs/1.5.X/orc8r/version-1.5.X-dev_security:
     -> linking to ./architecture_security (resolved as: /docs/1.5.X/orc8r/architecture_security)
  - Broken link on source page path = /docs/1.5.X/orc8r/version-1.5.X-upgrade_1_5:
     -> linking to ../nms/alerts#predefined-alerts (resolved as: /docs/1.5.X/nms/alerts#predefined-alerts)
     -> linking to ../nms/alerts#custom-alert-rules (resolved as: /docs/1.5.X/nms/alerts#custom-alert-rules)
  - Broken link on source page path = /docs/1.5.X/proposals/version-1.5.X-p014_proposal_process:
     -> linking to TEMPLATE.md (resolved as: /docs/1.5.X/proposals/TEMPLATE.md)  
     -> linking to 0_proposal-minutes.md (resolved as: /docs/1.5.X/proposals/0_proposal-minutes.md)
  - Broken link on source page path = /docs/1.6.X/feg/version-1.6.X-dev_notes:   
     -> linking to s1ap_tests.md (resolved as: /docs/1.6.X/feg/s1ap_tests.md)    
     -> linking to deploy_config_enodebd.md#basic-troubleshooting (resolved as: /docs/1.6.X/feg/deploy_config_enodebd.md#basic-troubleshooting)
     -> linking to ./s1ap_tests.md#testing-stateless-access-gateway (resolved as: /docs/1.6.X/feg/s1ap_tests.md#testing-stateless-access-gateway)
  - Broken link on source page path = /docs/1.6.X/lte/version-1.6.X-deploy_config_agw:
     -> linking to ../nms/organizations.md (resolved as: /docs/1.6.X/nms/organizations.md)
     -> linking to deploy_config_apn (resolved as: /docs/1.6.X/lte/deploy_config_apn)
  - Broken link on source page path = /docs/1.6.X/lte/version-1.6.X-dev_notes:   
     -> linking to ./enodebd.md#basic-troubleshooting (resolved as: /docs/1.6.X/lte/enodebd.md#basic-troubleshooting)
  - Broken link on source page path = /docs/1.6.X/nms/version-1.6.X-overview:    
     -> linking to ../howtos/call_tracing (resolved as: /docs/1.6.X/howtos/call_tracing)
  - Broken link on source page path = /docs/1.6.X/orc8r/version-1.6.X-dev_security:
     -> linking to ./architecture_security (resolved as: /docs/1.6.X/orc8r/architecture_security)
  - Broken link on source page path = /docs/1.6.X/orc8r/version-1.6.X-upgrade_1_5:
     -> linking to ../nms/alerts#predefined-alerts (resolved as: /docs/1.6.X/nms/alerts#predefined-alerts)
     -> linking to ../nms/alerts#custom-alert-rules (resolved as: /docs/1.6.X/nms/alerts#custom-alert-rules)
  - Broken link on source page path = /docs/1.6.X/proposals/version-1.6.X-p014_proposal_process:
     -> linking to 0_proposal-minutes.md (resolved as: /docs/1.6.X/proposals/0_proposal-minutes.md)
  - Broken link on source page path = /docs/1.6.X/proposals/version-1.6.X-proposal_template:
     -> linking to README.md (resolved as: /docs/1.6.X/proposals/README.md)      
  - Broken link on source page path = /docs/1.6.X/resources/version-1.6.X-ref_pcap:
     -> linking to ../../../../readmes/assets/feg/pcaps/inbound_roaming_05_210504_215514-1.pacpng (resolved as: /readmes/assets/feg/pcaps/inbound_roaming_05_210504_215514-1.pacpng)
  - Broken link on source page path = /docs/1.7.0/nms/version-1.7.0-overview:    
     -> linking to ../howtos/call_tracing (resolved as: /docs/1.7.0/howtos/call_tracing)
  - Broken link on source page path = /docs/1.7.0/orc8r/version-1.7.0-dev_security:
     -> linking to ./architecture_security (resolved as: /docs/1.7.0/orc8r/architecture_security)
  - Broken link on source page path = /docs/1.7.0/orc8r/version-1.7.0-upgrade_1_5:
     -> linking to ../nms/alerts#predefined-alerts (resolved as: /docs/1.7.0/nms/alerts#predefined-alerts)
     -> linking to ../nms/alerts#custom-alert-rules (resolved as: /docs/1.7.0/nms/alerts#custom-alert-rules)
  - Broken link on source page path = /docs/1.7.0/proposals/version-1.7.0-p014_proposal_process:
     -> linking to TEMPLATE.md (resolved as: /docs/1.7.0/proposals/TEMPLATE.md)  
     -> linking to 0_proposal-minutes.md (resolved as: /docs/1.7.0/proposals/0_proposal-minutes.md)
  - Broken link on source page path = /docs/1.7.0/proposals/version-1.7.0-p018_control_network_metrics:
     -> linking to resources/ref_magma_metrics (resolved as: /docs/1.7.0/proposals/resources/ref_magma_metrics)
  - Broken link on source page path = /docs/1.7.0/resources/version-1.7.0-ref_magma_metrics:
     -> linking to orc8r/architecture_modularity (resolved as: /docs/1.7.0/resources/orc8r/architecture_modularity)
  - Broken link on source page path = /docs/1.7.0/resources/version-1.7.0-ref_pcap:
     -> linking to ../../../../readmes/assets/feg/pcaps/inbound_roaming_05_210504_215514-1.pacpng (resolved as: /readmes/assets/feg/pcaps/inbound_roaming_05_210504_215514-1.pacpng)
  - Broken link on source page path = /docs/lte/version-1.8.0-dev_notes:
     -> linking to ./enodebd.md#basic-troubleshooting (resolved as: /docs/lte/enodebd.md#basic-troubleshooting)
  - Broken link on source page path = /docs/lte/version-1.8.0-extended_5g_sa_features:
     -> linking to integrated_5g_sa (resolved as: /docs/lte/integrated_5g_sa)    
     -> linking to extended_5g_sa_features#5g-qos (resolved as: /docs/lte/extended_5g_sa_features#5g-qos)
     -> linking to extended_5g_sa_features#ipv6--dual-ipv4v6-support (resolved as: /docs/lte/extended_5g_sa_features#ipv6--dual-ipv4v6-support)
     -> linking to extended_5g_sa_features#network-initiated-session-modification (resolved as: /docs/lte/extended_5g_sa_features#network-initiated-session-modification)
     -> linking to extended_5g_sa_features#suci-extensions (resolved as: /docs/lte/extended_5g_sa_features#suci-extensions)
     -> linking to extended_5g_sa_features#stateless-feature (resolved as: /docs/lte/extended_5g_sa_features#stateless-feature)
     -> linking to extended_5g_sa_features#gtp-extension-header-support (resolved as: /docs/lte/extended_5g_sa_features#gtp-extension-header-support)
     -> linking to suci_extensions (resolved as: /docs/lte/suci_extensions)      
     -> linking to ../../../../readmes/assets/lte/Session_modification_stub_cli_commands (resolved as: /readmes/assets/lte/Session_modification_stub_cli_commands)
  - Broken link on source page path = /docs/nms/version-1.8.0-overview:
     -> linking to ../howtos/call_tracing (resolved as: /docs/howtos/call_tracing)
  - Broken link on source page path = /docs/orc8r/version-1.8.0-dev_security:    
     -> linking to ./architecture_security (resolved as: /docs/orc8r/architecture_security)
  - Broken link on source page path = /docs/orc8r/version-1.8.0-upgrade_1_5:     
     -> linking to ../nms/alerts#predefined-alerts (resolved as: /docs/nms/alerts#predefined-alerts)
     -> linking to ../nms/alerts#custom-alert-rules (resolved as: /docs/nms/alerts#custom-alert-rules)
  - Broken link on source page path = /docs/proposals/version-1.8.0-p014_proposal_process:
     -> linking to TEMPLATE.md (resolved as: /docs/proposals/TEMPLATE.md)        
     -> linking to 0_proposal-minutes.md (resolved as: /docs/proposals/0_proposal-minutes.md)
  - Broken link on source page path = /docs/proposals/version-1.8.0-p018_control_network_metrics:
     -> linking to resources/ref_magma_metrics (resolved as: /docs/proposals/resources/ref_magma_metrics)
  - Broken link on source page path = /docs/resources/version-1.8.0-ref_magma_metrics:
     -> linking to orc8r/architecture_modularity (resolved as: /docs/resources/orc8r/architecture_modularity)
  - Broken link on source page path = /docs/resources/version-1.8.0-ref_pcap:    
     -> linking to ../../../../readmes/assets/feg/pcaps/inbound_roaming_05_210504_215514-1.pacpng (resolved as: /readmes/assets/feg/pcaps/inbound_roaming_05_210504_215514-1.pacpng)
  - Broken link on source page path = /:
     -> linking to /docs/feg/federated-LTE-overview
     -> linking to /docs/next/orc8r/deploying_orc8r
     -> linking to /docs/orc8r/swagger
     -> linking to /docs/next/orc8r/dev_setup
     -> linking to /docs/contributing/contribute-intro
     -> linking to /docs/next/changelog
     -> linking to /pdfs/magma-docs.pdf

      at throwError (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\logger\lib\logger.js:80:11)
      at reportBrokenLinks (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\server\brokenLinks.js:250:47)
      at handleBrokenLinks (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\server\brokenLinks.js:282:5)
      at executeBrokenLinksCheck (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\buildLocale.js:91:47)
      at C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\buildLocale.js:70:67
      at Object.async (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\logger\lib\perfLogger.js:42:47)
      at buildLocale (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\buildLocale.js:70:31)
      at async runBuildLocaleTask (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:93:5)     
      at async C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:74:13
      at async tryToBuildLocale (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:70:9)       
      at async C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:34:9
      at async mapAsyncSequential (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\utils\lib\jsUtils.js:21:24)
      at async Command.build (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\build\build.js:33:5)
      at async Promise.all (index 0)
      at async runCLI (C:\Users\User\Documents\prj\magma-documentation\docusaurus\node_modules\@docusaurus\core\lib\commands\cli.js:56:5)
      at async file:///C:/Users/User/Documents/prj/magma-documentation/docusaurus/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3
}
[INFO] Docusaurus version: 3.7.0
Node version: v22.14.0
error Command failed with exit code 1.

@lucaaamaral lucaaamaral force-pushed the chore/evaluate-conrado-pr branch from 3f7871c to 046d685 Compare April 18, 2025 01:24
lucaaamaral and others added 3 commits April 17, 2025 22:25
Signed-off-by: Lucas Amaral <lucaaamaral@gmail.com>
Signed-off-by: Lucas Amaral <lucaaamaral@gmail.com>
Changing the docusaurus version from costum to the standart open source release

Signed-off-by: conradogobato <conradogob07@gmail.com>
@lucaaamaral lucaaamaral force-pushed the chore/evaluate-conrado-pr branch from 046d685 to 9d27024 Compare April 18, 2025 01:29
…updating dependencies and configurations

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
@lucaaamaral lucaaamaral force-pushed the chore/evaluate-conrado-pr branch from 9d27024 to ea2d7de Compare April 18, 2025 01:41
see7e added 8 commits April 17, 2025 22:47
…mepage layout and styles

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
Remove CHANGELOG and NOTES files, clean up Dockerfile and docker-compose, and update docusaurus configuration

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
* chore: enhance CI workflows with new scripts for documentation checks and remove obsolete reference check

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* chore: update documentation CI workflow for improved checks and formatting

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* debug: Run everything for testing

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* testing: path filter step dependency removal

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* fix: grant execute permissions to workflow scripts for consistency checks

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* fix: update workflow scripts for improved debugging and path handling

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* fix: Convert format to standad POSIX and streamline with dos2unix dependency and consolidating permission grants

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

* fix: Update workflow scripts to change directory for dependency installation and improve script execution consistency

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>

---------

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
…cripts

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
…tion, Update Build & Log workflow

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
see7e added 4 commits April 17, 2025 22:47
…nally

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
…proved build command

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
…improve clarity

- Updated links in alerts_troubleshooting.md, alert.md, and other files to include the correct .md extension for consistency.
- Adjusted API endpoint formatting in proposals and howtos for better readability.
- Ensured all references to configuration steps and troubleshooting guides are accurate and up-to-date.

Signed-off-by: Gabryel Nóbrega <gabryelster@gmail.com>
@lucaaamaral
Copy link
Collaborator

In order to make a rebase, I had to:

  1. Rename the siteConfig.js to docussaurus.config.js.
  2. Update the configuration file with the latest working version with my changes to make it work. The original PR had removed many configurations from the Docusaurus.
  3. Install using NPN Docusaurus prerequisites for mermaid.
  4. Recovered images and used many of them.

I noticed that we have two package.json - maintain only one for deployment.

@see7e
Copy link
Contributor Author

see7e commented Apr 18, 2025

@lucaaamaral

  1. Rename the siteConfig.js to docussaurus.config.js.

Why? The configurations of the previous version of the file (regarding the latest version of Docusaurus) are now lost?

  1. Update the configuration file with the latest working version with my changes to make it work. The original PR had removed many configurations from the Docusaurus.

The information that was "removed" was mostly due to the update of the Docusaurus version, and also by Conrado's initial changes

  1. Install using NPN Docusaurus prerequisites for mermaid.

The original (from magma/magma) were using Yarn as package manager, so we should continue using the same as the CI was already updated for that

  1. Recovered images and used many of them.

It seems, as the above comments that I've posted that not only some images were "lost" but also some versioned documents, also due to Conrado changes... E.g. 0_proposal-minutes.md listed in comments above.

I noticed that we have two package.json - maintain only one for deployment.

The second package.json is called by the Docker containers, as the start command is different. Another related point is as some dependencies were included the package files should be updated (fixed):

[cause]: Error: Docusaurus was unable to resolve the "@docusaurus/theme-mermaid" theme. Make sure one of the following packages are installed:
  - @docusaurus/theme-mermaid
  - @docusaurus/docusaurus-theme-theme-mermaid

At Build and Log workflow

@see7e
Copy link
Contributor Author

see7e commented Apr 18, 2025

@lucaaamaral as discussed aat todays metting, moved the readmes folder and placed a symlink, the references for the assets should now be updated as pointed by Build and Log and URL Check

@lucaaamaral
Copy link
Collaborator

@lucaaamaral

  1. Rename the siteConfig.js to docussaurus.config.js.

Why? The configurations of the previous version of the file (regarding the latest version of Docusaurus) are now lost?

  1. Update the configuration file with the latest working version with my changes to make it work. The original PR had removed many configurations from the Docusaurus.

The information that was "removed" was mostly due to the update of the Docusaurus version, and also by Conrado's initial changes

I made a rebase bringing the changes of this file to a point prior to your changes. It was messy, probably not the best way to do it when thinking about the git history. Conrado's PR removed the previous configuration file, instead of renaming and adjusting its contents.

  1. Install using NPN Docusaurus prerequisites for mermaid.

The original (from magma/magma) were using Yarn as package manager, so we should continue using the same as the CI was already updated for that

I just added the mermaid under the packages.json file, we can update it afterwards.

  1. Recovered images and used many of them.

It seems, as the above comments that I've posted that not only some images were "lost" but also some versioned documents, also due to Conrado changes... E.g. 0_proposal-minutes.md listed in comments above.

Let's sove in a posterior PR.

I noticed that we have two package.json - maintain only one for deployment.

The second package.json is called by the Docker containers, as the start command is different. Another related point is as some dependencies were included the package files should be updated (fixed):

[cause]: Error: Docusaurus was unable to resolve the "@docusaurus/theme-mermaid" theme. Make sure one of the following packages are installed:
  - @docusaurus/theme-mermaid
  - @docusaurus/docusaurus-theme-theme-mermaid

At Build and Log workflow

Let's solve this in a different PR.

@lucaaamaral
Copy link
Collaborator

@lucaaamaral as discussed aat todays metting, moved the readmes folder and placed a symlink, the references for the assets should now be updated as pointed by Build and Log and URL Check

Please, revert the last commit and open a new branch and PR for these changes. I cannot evaluate new features and big changes in this PR anymore; it is already too big.

Let's focus -> this PR is about Docussaurus upgrade. Anything out of this scope, please create a new branch and open a separate PR.

Example of things outside the scope:

  • Changing the current structure or creating symlinks and moving files.
    If the previous version does not support or have a functionality, it is out the current scope. In this PR, fix only what has been broken on the update and nothing else.

@see7e
Copy link
Contributor Author

see7e commented Apr 23, 2025

Ok @lucaaamaral , i'll address to this requests on friday, as it's a holiday

Signed-off-by: Lucas Amaral <lucaaamaral@gmail.com>
Signed-off-by: Lucas Amaral <lucaaamaral@gmail.com>
@lucaaamaral lucaaamaral force-pushed the chore/evaluate-conrado-pr branch from de852d9 to 30fbca4 Compare April 23, 2025 17:08
Signed-off-by: Lucas Amaral <lucaaamaral@gmail.com>
Signed-off-by: Lucas Amaral <lucaaamaral@gmail.com>
Copy link
Contributor Author

@see7e see7e left a comment

Choose a reason for hiding this comment

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

I can't request changes, but some changes made in here escapes the scope of Conrado's changes

Comment on lines 3 to 4
**/package.json
**/package-lock.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the yarn.lock is ignored so should the package-lock.json, they're both the "same" file, only created by different package managers

Comment on lines +51 to +56
#==================================================================
# Production deployment with Caddy automatic SSL/TLS
#==================================================================
FROM caddy:2-alpine AS caddy
COPY --from=prod /opt/docusaurus/Caddyfile /etc/caddy/Caddyfile
COPY --from=prod /opt/docusaurus/build /var/docusaurus
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no need for a Caddy implementation as the GH Pages handles the deployment and certificates, unless will be hosted in a dedicated server, but as I remember @lucasgonze said it would continue to be in GH Pages

ports:
- "3000:3000"
- "3000:3000"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Trailing whitespace

Comment on lines 28 to 46
caddy: # TODO: fix issues
build:
context: .
target: caddy
container_name: docusaurus_caddy
ports:
- "80:80"
- "443:443"
environment:
- NODE_ENV=production
- DOCUSAURUS_DOMAIN=docusaurus.example
- DOCUSAURUS_EMAIL=letsencrypt@docusaurus.example
volumes:
- caddy_data:/data
- caddy_config:/config

volumes:
caddy_data:
caddy_config:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same note as in docusaurus/Dockerfile

@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"start": "docusaurus start --host 0.0.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will block local testing, some files are created with local commands such as translation files. This means that if the command is only called inside a Docker container the updated files will be located inside or the temporary container or at the volumes. Will be needed manual work to copy the local files (e.g. translation copies) to the local repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: evaluate and port Conrado's PR
2 participants