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

Notes based on files #609

Closed
dignifiedquire opened this issue Nov 21, 2016 · 3 comments
Closed

Notes based on files #609

dignifiedquire opened this issue Nov 21, 2016 · 3 comments

Comments

@dignifiedquire
Copy link
Contributor

dignifiedquire commented Nov 21, 2016

It would be great if I could include longer form documents in the toc. Something like this

toc: 
  - name: Introduction
    file: intro.md
  - name: About
    description: "Cool stuf is happening in here"

and then the content is simply read in from the intro.md file instead inlined in here.

@dignifiedquire
Copy link
Contributor Author

If this sounds good, I'm happy to work on this, but I'm not entirely sure where the best place is to add the processing of file -> fs -> description would be.

@tmcw
Copy link
Member

tmcw commented Nov 21, 2016

Cool! The code path for loading a configuration is lib/commands/shared_options -> load_config.js but the best place to load descriptions from files would be in sort.js, since that code is called regardless of if you use the CLI or the Node API. The linked section is where I think you'd be at the best place to implement - where we test for val.description we could also test for val.file and load & parse the file if it exists.

@dignifiedquire
Copy link
Contributor Author

@tmcw PR is up :)

@tmcw tmcw closed this as completed in #614 Nov 23, 2016
tmcw pushed a commit that referenced this issue Nov 23, 2016
* feat(config): add file property for notes

Fixes #609

* feat(config): resolve files against the config file location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants