-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ported theme from polykey.io #17
Conversation
@amydevs, can you please do me the favour of looking into this PR as well? Thank you |
@CMCDragonkai, I've closed #12, because it is an incomplete piece of work and doesn't work correctly. I've also moved anything useful from #12 to this PR. So this PR is the only PR that we need. Thanks |
@CMCDragonkai, by the way, the reason for the sheer amount of changes in this PR is that I've added the prettier (similar to other Polykey repos), and reformatted all the files. |
Cool thanks. |
Note that unlike the websites, the wiki is going to have alot of files and photos. These should go into github LFS. See comment here: https://github.com/MatrixAI/Polykey-Docs/pull/12#issuecomment-1373063144#17 This will still work when deployed to cloudflare, the CI/CD should then download everything when pushing up. Make sure to configure LFS in the gitlab CI file. |
@amydevs any changes necessary from polykey.io review? Also don't forget the matrix.ai hubspot change over too. |
4bf21d0
to
89b9fc5
Compare
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.
Everything looks good, should be ready to merge.
@amydevs did you test the worker system? And also remember our development worker URL, can you deploy and send me the link on slack for inspection? |
@@ -17,7 +17,8 @@ | |||
"start": "docusaurus start", | |||
"swizzle": "docusaurus swizzle", | |||
"build": "docusaurus build --out-dir=./public", | |||
"deploy": "wrangler publish" | |||
"deploy": "wrangler publish", | |||
"code:format": "prettier --write \"**/*.{ts,tsx,js,jsx,css,md,mdx}\"" |
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.
This should be lintfix
like the rest.
/** | ||
* Map request to documentation asset (HTML, CSS, JS, images, files... etc) | ||
* This worker is routed from `polykey.io/docs` | ||
* All of the `../docs` assets is uploaded to the "root" of the worker | ||
* Therefore the `/docs` path segment must be removed, as `getAssetFromKV` uses the pathname | ||
* of the URL to look up the correct asset | ||
*/ | ||
function mapRequestToDocs(req: Request): Request { | ||
// Default mapping resolves directory URLs e.g. `/dir` becomes `/dir/index.html` | ||
const assetRequest = mapRequestToAsset(req); | ||
const assetUrl = new URL(assetRequest.url); | ||
// Strip the `/docs` segment: `https://polykey.io/docs/...` -> `https://polykey.io/...` | ||
assetUrl.pathname = assetUrl.pathname.replace(/^\/docs/, '/'); | ||
return new Request(assetUrl.toString(), assetRequest); | ||
} | ||
|
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.
This removal breaks production.
Ported theme from polykey.io
Ported theme from polykey.io
Related Issue: #6
I've added Matrix AI's default linter and the prettier setup that we have used for Matrix AI's website. That's the reason for the huge number of file changes. Otherwise, this PR is rather small.
The PR includes the fonts and the new header. It also changes the footer to matches the look & feel of polykey.io.