Skip to content

Docs: Clarify config file #2533

@peteruithoven

Description

@peteruithoven

Feature request

What problem does this feature solve?

Currently when you don't read all the documentation, pages like Writing a theme > Directory structure it can be a bit hard to figure out what is meant with "your theme configuration", what file this refers to. (It's the theme entry / config file, commonly at .vuepress/theme/index.js).
This is especially noticeable when you look at Theme inheritance. And, even worse, the Theme Configuration hardly mentions the default file name and path.

In the case of the Using a theme it's also quite unclear which file this is targeting. (In this case it's the main config file, commonly at .vuepress/config.js).

Proposed change

Let's make sure we mention .vuepress/theme/index.js, the default entry / config file of the theme, more often throughout the documention. The Default Theme Config is a good example, it frequently adds the file path to the config examples, like:

// .vuepress/config.js
module.exports = {
  themeConfig: {
    logo: '/assets/img/logo.png',
  }
}

(I realize that the first tip on Theme Configuration tries to clarify the difference, but it also doesn't mention the file names.)
(Theme Configuration > globalLayout is one of the few places where the file name is added)

I'm not sure if .vuepress/theme/index.js or themePath/index.js is more appropriate & understandable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions