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

Custom HTML template in siteconfig #882

Closed
ekoeryanto opened this issue Sep 28, 2018 · 6 comments
Closed

Custom HTML template in siteconfig #882

ekoeryanto opened this issue Sep 28, 2018 · 6 comments

Comments

@ekoeryanto
Copy link
Contributor

ekoeryanto commented Sep 28, 2018

Feature request

seen here I think the better one is in themeConfig

What problem does this feature solve?

What does the proposed API look like?

How should this be implemented in your opinion?

Are you willing to work on this yourself?**

@ulivz ulivz closed this as completed in 7437005 Sep 28, 2018
@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

Supported in 6c6225d

Now the resolving priority (devTemplate as example) is as follows:

  1. siteConfig.devTemplate
  2. dev.html located at .vuepress/templates
  3. themeIndexFile.devTemplate
  4. default devTemplate

FYI.

themeIndexFile refers to the entry file index.js of the theme. while themeConfig is a field of siteConfig. —— Consider creating a glossary later to avoid confusion.


BTW.

Improving documentation are welcome. When the document was stable, I will officially announce the release of next version.

ulivz added a commit that referenced this issue Sep 28, 2018
)

    Resolving Priority (devTemplate as example):

      1. siteConfig.devTemplate
      2. `dev.html` located at .vuepress/templates
      3. themeIndexFile.devTemplate
      4. default devTemplate
@ekoeryanto
Copy link
Contributor Author

I am sorry, I am not good in documentation. will help in other way

@ekoeryanto
Copy link
Contributor Author

ekoeryanto commented Sep 28, 2018

I see it still using siteConfig not themeConfig

   const { siteSsrTemplate, siteDevTemplate } = this.siteConfig

also, palette should be in themeConfig not in siteConfig

@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

I don't think it should be in themeConfig. detail of themeConfig should be controlled by theme itself instead of core.

@meteorlxy
Copy link
Member

@ekoeryanto Themes can set devTemplate by themeIndexFile.devTemplate, which will be overrided by siteConfig

@ekoeryanto
Copy link
Contributor Author

ha, thanks I think I need to read the source again carefully

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

No branches or pull requests

3 participants