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

feat(cli): support custom srcDir #4270

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Barbapapazes
Copy link
Contributor

Description

Hello 👋,

This PR introduces a new scaffolding parameter to ask the developer where Markdown files should be stored. This is related to the srcDir parameter in the vitepress.config.js file.

For blogs, portfolios, and marketing sites, or any sites that use VitePress as the main project (without a docs folder), having a src folder is more intuitive and I think a better architecture than having every Markdown files at the root of the project. The file .vitepress/config.{js,ts} can stay at the root of the project.

The architecture of the project will look like this:

.
├── src
|   ├── file.md
|   └── file2.md
└── .vitepress
    └── config.{js,ts}

Linked Issues

Additional Context

I'm building a tutorial on how to create a blog with VitePress and Vue.js from scratch. I used a lot VitePress for documentation, and it was fine. But for blogs, portfolios, and marketing sites, as mentioned in the VitePress documentation, I think the CLI needs some adjustments to make it easier to use and less documentation's oriented.


Tip

The author of this PR can publish a preview release by commenting /publish below.

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.

1 participant