-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
✅ Deploy Preview for oasisprotocol-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this 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
// 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')]; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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
🤔 |
2ed958e
to
c8ec358
Compare
This should work. Probably the remark rewrites are wrong? The file above should not map into /dapp/cipher path. |
01d1226
to
856a699
Compare
You will also need a PR in oasis-sdk that updates Sapphire and Cipher links here: |
Yes, there is oasisprotocol/oasis-sdk#2100 |
856a699
to
e272995
Compare
docs/dapp/tools/other-paratimes/emerald/writing-dapps-on-emerald.mdx
Outdated
Show resolved
Hide resolved
- remove truffle section from emerald - add redirects
6ce6070
to
ac9a27e
Compare
needs fix: links to emerald and cipher sapphire-paratime#466 for fixing external link in sapphire
PREVIEW