-
Notifications
You must be signed in to change notification settings - Fork 19
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
Create author.mdx #384
Create author.mdx #384
Conversation
Made a solution for Document Content Authoring. Issue #259
@AXE02 is attempting to deploy a commit to the mosaic-dev-team Team on Vercel. A member of the Team first needs to authorize it. |
|
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.
Thank you very much for your contribution to Mosaic @AXE02. There are a few issues that can be easily addressed.
Out of interest, have you cloned the repo and tried to view the page you have created?
This reads more as a getting started guide so it may be best to move it there rather than have it has an 'author' page. The page here could then link to the guide.
1. Install dependencies: Ensure you have Node.js and npm installed on your machine. Then, navigate to the root directory of the cloned `mosaic` repository and run the following command to install the necessary dependencies: | ||
|
||
```bash | ||
npm install |
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.
We use yarn
as the package manager not npm
3. Author the page using MDX syntax: Open the newly created `.mdx` file in a text editor and use MDX syntax to write the content. You can include Markdown and Mosaic components in the document. Here's an example: | ||
|
||
```mdx | ||
import { Callout, Tile } from '@jpmorganchase/mosaic'; |
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.
Should be from @jpmorganchase/mosaic-components
|
||
## Callout Component | ||
|
||
<Callout variant="info"> |
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.
There is no "info" variant for the Callout
component
</Tile> | ||
``` | ||
|
||
In this example, the `Callout` and `Tile` components are imported from `@jpmorganchase/mosaic` and used within the MDX document. You can include any other commonly used components in a similar manner. |
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.
wrong package name again, should be from @jpmorganchase/mosaic-components
|
||
In this example, the `Callout` and `Tile` components are imported from `@jpmorganchase/mosaic` and used within the MDX document. You can include any other commonly used components in a similar manner. | ||
|
||
4. Add the page to the sidebar: To display the newly created page in the sidebar navigation, you need to update the `sidebars.js` file located in the `.vuepress` directory. Open the `sidebars.js` file and add an entry for your page, specifying the title and file path. For example: |
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.
None of this is required....the page will be found by the SidebarPlugn
.
Also not clear why you mention .vuepress
directory?
}; | ||
``` | ||
|
||
5. Start the development server: Run the following command in the root directory of the `mosaic` repository to start the development server: |
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 seems to be targeting how you would write a doc for this repo but it should be targeted at people who have generated a new mosaic site.
5. Start the development server: Run the following command in the root directory of the `mosaic` repository to start the development server: | ||
|
||
```bash | ||
npm run dev |
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.
mosaic sites should be run locally using yarn serve
as this starts up both the site and the mosaic filesystem
npm run dev | ||
``` | ||
|
||
This command will start the server and generate the static site. You can then view the site in your browser by navigating to `http://localhost:8080`. |
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.
- does not generate a static site.
- localhost:8080 is the filesystem instance url
- the site is available at
http://localhost:3000
Might want to direct people to the page they just authored as it is likely to be want they most want to see.
No activity for 2 weeks and no response to any comments. Closing. Feel free to reopen to address the comments made or to ask more questions. |
Made a solution for Document Content Authoring. Issue #259