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

Ported theme from polykey.io #17

Merged
merged 6 commits into from
Mar 15, 2023
Merged

Ported theme from polykey.io #17

merged 6 commits into from
Mar 15, 2023

Conversation

bmamouri
Copy link
Contributor

@bmamouri bmamouri commented Feb 25, 2023

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.

@bmamouri
Copy link
Contributor Author

@amydevs, can you please do me the favour of looking into this PR as well? Thank you

@CMCDragonkai
Copy link
Member

@amydevs @bmamouri how does this PR work with the previous PR #12?

Does there need to be some cherry-picking between the 2?

I'm a bit confused about how to review this, and if we are missing any work in #12.

If we aren't please close #12 and indicate that it is superseded by this PR.

@bmamouri bmamouri mentioned this pull request Mar 14, 2023
9 tasks
@bmamouri
Copy link
Contributor Author

bmamouri commented Mar 14, 2023

@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

@bmamouri
Copy link
Contributor Author

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

@CMCDragonkai
Copy link
Member

Cool thanks.

@CMCDragonkai
Copy link
Member

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.

@CMCDragonkai
Copy link
Member

@amydevs any changes necessary from polykey.io review?

Also don't forget the matrix.ai hubspot change over too.

@CMCDragonkai CMCDragonkai requested a review from amydevs March 14, 2023 02:29
@CMCDragonkai CMCDragonkai changed the title New Theme Ported theme from polykey.io Mar 14, 2023
Copy link
Contributor

@amydevs amydevs left a 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.

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Mar 15, 2023

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

@CMCDragonkai CMCDragonkai merged commit 03f3273 into master Mar 15, 2023
@CMCDragonkai CMCDragonkai deleted the feature-newtheme branch March 15, 2023 03:29
@@ -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}\""
Copy link
Member

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.

Comment on lines -49 to -64
/**
* 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);
}

Copy link
Member

Choose a reason for hiding this comment

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

This removal breaks production.

CMCDragonkai added a commit that referenced this pull request Dec 2, 2023
CMCDragonkai added a commit that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants