-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
tsconfig alias-support-documentation (PR from TinaCMS) #2647
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ben Neoh <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -55,4 +55,39 @@ export default defineConfig({ | |||
``` | |||
|
|||
In this example, the TinaCMS admin will be viewable at `<my-site-url>/admin/index.html`. | |||
For more information [check out the content modeling section](/docs/schema/). | |||
For more information [check out the content modeling section](/docs/schema/).\ | |||
\ |
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.
question: Why are the backslashes required?
|
||
## Typescript Path Alias | ||
|
||
TinaCMS supports typeScript path aliases in the tina.config.js file and collections, making it easier to organize and maintain your code. |
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.
typo:
TinaCMS supports typeScript path aliases in the tina.config.js file and collections, making it easier to organize and maintain your code. | |
TinaCMS supports TypeScript path aliases in the `tina.config.js` file and collections, making it easier to organize and maintain your code. |
|
||
##### Use alias in config.ts | ||
|
||
Ensure that tsconfig.json exists at the root of your project. Define your aliases in the compilerOptions section: |
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.
consistency: The introductory paragraph has the files and in-code declaration formatted as in-line code.
Ensure that tsconfig.json exists at the root of your project. Define your aliases in the compilerOptions section: | |
Ensure that `tsconfig.json` exists at the root of your project. Define your aliases in the `compilerOptions` section: |
} | ||
``` | ||
|
||
Figure: Your defined tsconfig.json |
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.
consistency: As described above:
Figure: Your defined tsconfig.json | |
Figure: Your defined `tsconfig.json` |
}) | ||
``` | ||
|
||
Figure: Using aliases in tina config.ts |
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.
consistency: As described above:
Figure: Using aliases in tina config.ts | |
Figure: Using aliases in tina `config.ts` |
This documentation pr is related to new support feature
PR in tinacms
Related issue