vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.43k stars 4.78k forks source link

difference of the same folder in `.vuepress` and `.vuepress/theme` #2740

Open iamryanchia opened 3 years ago

iamryanchia commented 3 years ago

In the docs Directory Structure and Writing a theme, I find there are same folders like components, styles, ... in .vuepress and .vuepress/theme. So what is their difference? I want to define variables, i find it only takes effect when i define in .vuepress/styles/palette.styl.

chris-dura commented 3 years ago

@iamRyanChia --

This is just a guess, because there might be a much more technical reason under-the-covers of VuePress...

But, my impression is that .vuepress/theme is mostly for theme Authors that are writing custom themes (or extending them, etc.) So, if you're a User that is just interested in changing some variables to adjust someone else's theme that is installed (ie, the default theme), you probably won't have a .vuepress/theme directory at all -- you would do everything in .vupress, and just adjust .vuepress/styles/palette.styl.

If I had to -- maybe I would naively characterize it like this?