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

Support saber config in theme directory #160

Open
egoist opened this issue May 8, 2019 · 2 comments
Open

Support saber config in theme directory #160

egoist opened this issue May 8, 2019 · 2 comments
Assignees
Labels

Comments

@egoist
Copy link
Collaborator

egoist commented May 8, 2019

Issuehunt badges

Feature request

What problem does this feature solve?

A theme should be able to pre-configure siteConfig themeConfig plugins etc.

What does the proposed API look like?

Just populate a saber config file in your theme directory.

Some options are not available when it is loaded from theme directory, e.g. theme

How should this be implemented in your opinion?

Merge it with the saber config we found at project root.

Are you willing to work on this yourself?

PR welcome.

There is a $80.00 open bounty on this issue. Add more on Issuehunt.

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 9, 2019
@IssueHuntBot
Copy link

@IssueHunt has funded $80.00 to this issue.


@egoist egoist self-assigned this May 11, 2019
@egoist
Copy link
Collaborator Author

egoist commented May 26, 2019

This is actually already possible by using saber-node.js in the theme directory:

// Add a plugin based on `themeConfig`:
exports.beforeRun = function () {
  if (this.config.themeConfig.feed) {
    this.applyPlugin(require('saber-plugin-feed'))
  } 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants