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

Create author.mdx #384

Closed
wants to merge 1 commit into from
Closed

Create author.mdx #384

wants to merge 1 commit into from

Conversation

AXE02
Copy link

@AXE02 AXE02 commented Jun 14, 2023

Made a solution for Document Content Authoring. Issue #259

Made a solution for Document Content Authoring. Issue #259
@AXE02 AXE02 requested a review from a team as a code owner June 14, 2023 15:57
@vercel
Copy link

vercel bot commented Jun 14, 2023

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

@changeset-bot
Copy link

changeset-bot bot commented Jun 14, 2023

⚠️ No Changeset found

Latest commit: 96ea4e0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@DavieReid DavieReid left a 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
Copy link
Contributor

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';
Copy link
Contributor

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">
Copy link
Contributor

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.
Copy link
Contributor

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:
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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`.
Copy link
Contributor

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.

@DavieReid
Copy link
Contributor

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.

@DavieReid DavieReid closed this Jun 28, 2023
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