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: custom content rewrite #202

Merged
merged 4 commits into from
Nov 30, 2021
Merged

docs: custom content rewrite #202

merged 4 commits into from
Nov 30, 2021

Conversation

sannek
Copy link
Contributor

@sannek sannek commented Nov 30, 2021

What kind of change does this pull request introduce?

Rewrites the custom content documentation page for increased clarity.

  • Documentation
  • Ready to be merged

@vercel
Copy link

vercel bot commented Nov 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

sandpack-theme – ./website/theme

🔍 Inspect: https://vercel.com/codesandbox/sandpack-theme/7dHg9NQxABreuTauBrMLNiNjcQiJ
✅ Preview: Failed

@vercel vercel bot temporarily deployed to Preview – sandpack-docs November 30, 2021 12:08 Inactive
@vercel vercel bot temporarily deployed to Preview – sandpack-theme November 30, 2021 12:08 Inactive
@vercel vercel bot temporarily deployed to Preview – sandpack-landing November 30, 2021 12:08 Inactive
website/docs/docs/getting-started/custom-content.md Outdated Show resolved Hide resolved
The `files` prop accepts an object, where each `key` is the **relative path** of the file in the sandbox folder
structure. Files are added on top of the `template` structure. Furthermore, the `template` is using the same type to [define the files](https://github.com/codesandbox/sandpack/blob/main/sandpack-react/src/templates/react.ts) it contains. With this in mind, you can overwrite any of the template/sandbox
files (eg: `/index.js`, `/index.css`, etc.)
The `files` prop accepts an object, where each `key` is the **relative path** of that file in the sandbox folder structure. Files passed in through the `files` prop override those in the `template` structure. Since each `template` uses the same type to define the files, you can overwrite the contents of any of the template files.
Copy link
Member

Choose a reason for hiding this comment

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

👍

@vercel vercel bot temporarily deployed to Preview – sandpack-docs November 30, 2021 14:03 Inactive
@vercel vercel bot temporarily deployed to Preview – sandpack-landing November 30, 2021 14:03 Inactive
@vercel vercel bot temporarily deployed to Preview – sandpack-theme November 30, 2021 14:03 Inactive
@sannek sannek merged commit fa9e827 into main Nov 30, 2021
@sannek sannek deleted the docs/custom-content branch November 30, 2021 14:56
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.

2 participants