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

.vuepress/style.styl not loaded #883

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

.vuepress/style.styl not loaded #883

ekoeryanto opened this issue Sep 28, 2018 · 12 comments

Comments

@ekoeryanto
Copy link
Contributor

ekoeryanto commented Sep 28, 2018

Bug report

Version

1.0

Steps to reproduce

What is expected?

What is actually happening?

Other relevant information

  • Your OS:
  • Node.js version:
  • Browser version:
  • Is this a global or local install?
  • Which package manager did you use for the install?
ekoeryanto added a commit to ekoeryanto/vuepress that referenced this issue Sep 28, 2018
@x8x
Copy link
Contributor

x8x commented Sep 28, 2018

In the meantime, adding palette to config.js works fine:

module.exports = {
	palette: {
		$accentColor = #000
	}
}

Wondering if having multiple ways to do the same thing doesn't complicate too much the code and its maintainability, I would much prefer to have one opinionated way to do things, but understand other may prefer other ways and/or that is done on purpose so that any plugin/submodule, etc, can configure/bypass defaults. If there are breaking changes form 0.x to 1.x I would definitely not add support keeping pre 1.x stuff working and provide instead an upgrade guide.

Btw, @ulivz Thanks! You have done an amazing work on this 1.0alpha !!
I've been able to migrate to 1.x, some issues with paths and smart paths.

@ekoeryanto
Copy link
Contributor Author

ekoeryanto commented Sep 28, 2018

@x8x no, the solution doesn't work for me, I understand about the palette and implement that instead of deprecated override.styl

I've been able to migrate to 1.x, some issues with paths and smart paths.

Are u using style.styl to override default theme?

@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

@x8x Maybe you confused the responsibilities of override.styl(deprecated, changed to palette) and style.styl. of course we'll write migration guide.

But now, I even have not officially announced the release yet, so please wait.

BTW, for those new APIs not being documented now, please use it until it's stable and documented. or I'll close it if you created issue for this .

@ekoeryanto
Copy link
Contributor Author

for quick fix this issue:

// .vuepress/config.js
const path = require('path')
module.exports = {
  palette: path.resolve(__dirname, 'palette.styl'),
}
// .vuepress/palette.styl
$accentColor = #008080

@import './style.styl'

@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

@ekoeryanto Do not write styles in palette !!!

@ekoeryanto
Copy link
Contributor Author

Thanks, I'll rename it until it's fixed 😄

@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

Sorry but I cannot reproduce it.

@ulivz
Copy link
Member

ulivz commented Sep 28, 2018

I confirmed again and it works, I think you should be careful before creating an issue, please treasure each other's time.

@ulivz ulivz closed this as completed Sep 28, 2018
@ekoeryanto
Copy link
Contributor Author

ekoeryanto commented Sep 28, 2018

@ulivz, I did clean cache and temp dir but still config.styl not loaded.

Sorry for this, I'll recheck my env

@x8x
Copy link
Contributor

x8x commented Sep 28, 2018

@ulivz Right! Confused style.styl with palette.styl, so in my case it was palette.styl that was not loaded and had to write it into config.js. Probably better wait a couple days before reporting issues, you probably already know what needs to be fixed and are just short on time ;-)

@rwam
Copy link

rwam commented Oct 5, 2018

Same here with the palette. I've tried to use palette.styl instead of override.styl with no luck. I'm using a config.yml for the settings, but a palette setting doesn't work either.

So I rollback to 0.14.4 because of confusing docs on https://vuepress.vuejs.org/config/#styling - the only way that work for me is the use of an override.styl. Should be clarified in the docs too.

@ulivz
Copy link
Member

ulivz commented Oct 5, 2018

@rwam If you are using 0.14.x, you should go to https://v0.vuepress.vuejs.org (Please have a good look at README.). and for the next version, since it is still in the alpha stage, all APIs are not yet fully determined, as well as all documents.

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

4 participants