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

docs: move emerald and cipher into other-paratimes #1041

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

rube-de
Copy link
Contributor

@rube-de rube-de commented Dec 4, 2024

PREVIEW

@rube-de rube-de linked an issue Dec 4, 2024 that may be closed by this pull request
Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for oasisprotocol-docs ready!

Name Link
🔨 Latest commit ac9a27e
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-docs/deploys/6769652355c09a00082506e4
😎 Deploy Preview https://deploy-preview-1041--oasisprotocol-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@rube-de rube-de marked this pull request as ready for review December 4, 2024 15:39
@rube-de rube-de requested review from matevz and aefhm December 5, 2024 10:27
Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

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

Can you temporarily bump the external/ modules to the unblocking PRs so Netlify can generate the preview?

redirects.ts Outdated
Comment on lines 327 to 333
// 1041 Move Emerald and Cipher to /tools/other-paratimes/
if (existingPath.includes('/dapp/emerald')) {
return [existingPath.replace('/dapp/emerald', '/dapp/tools/other-paratimes/emerald',)];
}
if (existingPath.includes('/dapp/cipher/')) {
return [existingPath.replace('/dapp/cipher', '/dapp/tools/other-paratimes/cipher')];
}
Copy link
Member

Choose a reason for hiding this comment

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

Just add '/dapp/tools/other-paratimes/emerald' to the existing array above.
The same for cipher.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So just the static, no dynamic?

Copy link
Member

@matevz matevz Dec 6, 2024

Choose a reason for hiding this comment

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

Something like this:

        if (existingPath.includes('/dapp/tools/other-paratimes/emerald')) {
            return [
                existingPath.replace('/dapp/tools/other-paratimes/emerald', '/general/developer-resources/emerald-paratime'),
                existingPath.replace('/dapp/tools/other-paratimes/emerald', '/dapp/emerald')
            ];
        }

This will take all .md files in /dapp/tools/other-paratimes/emerald and put static redirects to /dapp/emerald and /general/developer-resources/emerald-paratime folders.

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively we could ditch the createRedirects() entirely and list all files one by one in the redirects field.

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 actually don't understand the dynamic createRedirects().
Why change the existing path when it is the new correct one?

Copy link
Member

Choose a reason for hiding this comment

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

I actually don't understand the dynamic createRedirects(). Why change the existing path when it is the new correct one?

This function is called passing absolute URL of each file that currently exists. The function maps it to one or more historic paths which now contain redirection HTML code.

@matevz
Copy link
Member

matevz commented Dec 5, 2024

* keep hello-world symbol link because of [external dependency](https://github.com/oasisprotocol/adrs/blob/main/0014-runtime-signing-tx-with-hardware-wallet.md?plain=1#L849)

The ADR14 markdown file correctly references the hello-world.md file using the absolute github url. It should work without having a symlink.

@rube-de
Copy link
Contributor Author

rube-de commented Dec 6, 2024

* keep hello-world symbol link because of [external dependency](https://github.com/oasisprotocol/adrs/blob/main/0014-runtime-signing-tx-with-hardware-wallet.md?plain=1#L849)

The ADR14 markdown file correctly references the hello-world.md file using the absolute github url. It should work without having a symlink.

You are right, the code links to the absolute, but if I build it without the symlink I get

  Exhaustive list of all broken links found:
  - Broken link on source page path = /adrs/0014-runtime-signing-tx-with-hardware-wallet:
     -> linking to /dapp/cipher/hello-world#deploying-the-contract

🤔
Also the ci-test fails without it 🤷‍♂️

@rube-de rube-de force-pushed the rube/979-remove-truffle-section-from-emerald branch from 2ed958e to c8ec358 Compare December 6, 2024 09:55
@rube-de rube-de requested review from aefhm and matevz December 6, 2024 10:35
@matevz
Copy link
Member

matevz commented Dec 6, 2024

* keep hello-world symbol link because of [external dependency](https://github.com/oasisprotocol/adrs/blob/main/0014-runtime-signing-tx-with-hardware-wallet.md?plain=1#L849)

The ADR14 markdown file correctly references the hello-world.md file using the absolute github url. It should work without having a symlink.

You are right, the code links to the absolute, but if I build it without the symlink I get

  Exhaustive list of all broken links found:
  - Broken link on source page path = /adrs/0014-runtime-signing-tx-with-hardware-wallet:
     -> linking to /dapp/cipher/hello-world#deploying-the-contract

🤔 Also the ci-test fails without it 🤷‍♂️

This should work. Probably the remark rewrites are wrong? The file above should not map into /dapp/cipher path.

docs/dapp/tools/other-paratimes/cipher/README.mdx Outdated Show resolved Hide resolved
docs/dapp/tools/other-paratimes/cipher/README.mdx Outdated Show resolved Hide resolved
docs/dapp/tools/other-paratimes/README.mdx Outdated Show resolved Hide resolved
docs/dapp/tools/other-paratimes/README.mdx Outdated Show resolved Hide resolved
@rube-de rube-de force-pushed the rube/979-remove-truffle-section-from-emerald branch 2 times, most recently from 01d1226 to 856a699 Compare December 12, 2024 19:56
@rube-de rube-de self-assigned this Dec 12, 2024
@rube-de rube-de added the documentation Improvements or additions to documentation label Dec 12, 2024
@matevz
Copy link
Member

matevz commented Dec 18, 2024

You will also need a PR in oasis-sdk that updates Sapphire and Cipher links here:
https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/deployment.md?plain=1#L104-L105

@rube-de
Copy link
Contributor Author

rube-de commented Dec 23, 2024

You will also need a PR in oasis-sdk that updates Sapphire and Cipher links here: https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/deployment.md?plain=1#L104-L105

Yes, there is oasisprotocol/oasis-sdk#2100

@rube-de rube-de force-pushed the rube/979-remove-truffle-section-from-emerald branch from 856a699 to e272995 Compare December 23, 2024 11:17
docs/dapp/README.mdx Outdated Show resolved Hide resolved
docs/dapp/tools/band.md Outdated Show resolved Hide resolved
- remove truffle section from emerald
- add redirects
@rube-de rube-de force-pushed the rube/979-remove-truffle-section-from-emerald branch from 6ce6070 to ac9a27e Compare December 23, 2024 13:26
@rube-de rube-de merged commit 792ebcc into main Dec 23, 2024
6 checks passed
@rube-de rube-de deleted the rube/979-remove-truffle-section-from-emerald branch December 23, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove truffle section from Emerald
3 participants