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] Setup a new next.js application for documentation #299

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 commented Nov 4, 2024

This app only uses Pigment and some CSS module for styling and will serve as an internal dogfood for us.

The styling and most of the mdx related logic has been taken from the Base UI docs.
Similarly, it uses the app router with static export to build the whole docs statically that we can then deploy on Netlify.

Preview - https://deploy-preview-299--pigment-css.netlify.app/

@brijeshb42 brijeshb42 force-pushed the docs-setup branch 5 times, most recently from 5780e3e to 0265ee2 Compare November 4, 2024 10:15
@zannager zannager added the docs Improvements or additions to the documentation label Nov 4, 2024
@brijeshb42 brijeshb42 added scope: docs-infra Specific to the docs-infra product and removed docs Improvements or additions to the documentation labels Nov 4, 2024
Brijesh Bittu added 4 commits November 5, 2024 15:16
This app only uses Pigment and some CSS module for styling and will
serve as an internal dogfood for us.
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

I think we can merge this and iterate. Few things:

  • can we remove the unused svgs from docs/public?
  • the logo would look better if it is black
  • the versions dropdown is not opening (do we even need it to be a dropdown at this point?


## Installation

Pigment CSS has two category of packages. First one is to be imported and used in your source code. This includes the public API of the package. Second category is to be imported in your bundler config file to configure and actually be able to use Pigment CSS. We currently support [`Next.js`](https://nextjs.org/) (no Turbopack yet), [`Vite`](https://vite.dev/) and [`Webpack`](https://webpack.js.org/).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Pigment CSS has two category of packages. First one is to be imported and used in your source code. This includes the public API of the package. Second category is to be imported in your bundler config file to configure and actually be able to use Pigment CSS. We currently support [`Next.js`](https://nextjs.org/) (no Turbopack yet), [`Vite`](https://vite.dev/) and [`Webpack`](https://webpack.js.org/).
Pigment CSS has two category of packages.
First one is to be imported and used in your source code.
This includes the public API of the package.
Second category is to be imported in your bundler config file to configure and actually be able to use Pigment CSS.
We currently support [`Next.js`](https://nextjs.org/) (no Turbopack yet), [`Vite`](https://vite.dev/) and [`Webpack`](https://webpack.js.org/).

Not important for this PR, but putting each sentence in a new line, makes the review so much easier. This is the convention we use in the Material UI's docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do in separate PRs. This wasn't even real content.

const DATA_DIR = path.join(process.cwd(), 'data');

const nextConfig: NextConfig = {
/* config options here */
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/* config options here */

@brijeshb42
Copy link
Contributor Author

@mnajdova

  1. Done
  2. We can revisit this separately. I just copied over the current svg from README.
  3. It is disabled right now since there is just one version. I copied this over from Base UI. We could probably comment it out now and add it back when we actually need it.

I'll merge this and do more refinements (point 2 and 3) in separate PRs.

@brijeshb42 brijeshb42 merged commit 042b771 into mui:master Nov 5, 2024
15 checks passed
@brijeshb42 brijeshb42 deleted the docs-setup branch November 5, 2024 10:41
@mnajdova
Copy link
Member

mnajdova commented Nov 5, 2024

Sounds good 👍

'react/react-in-jsx-scope': 'off',
'react/no-unknown-property': ['error', { ignore: ['sx'] }],
'import/extensions': [
'error',
Copy link
Member

@oliviertassinari oliviertassinari Nov 5, 2024

Choose a reason for hiding this comment

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

Config will need to move to the root folder eslint config file to prepare Eslint v9 upgrade.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Nov 9, 2024
@oliviertassinari
Copy link
Member

I wired it to https://pigment-css.com/ with docs-v1 branch for production.

@mnajdova
Copy link
Member

I wired it to https://pigment-css.com/ with docs-v1 branch for production.

I think we could have waited with this. Maybe we can make the Landing page with something like "Under construction" and don't like the docs yet. cc @brijeshb42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants