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

Ability to read/compile .MD file from installed npm module #549

Closed
randyhoulahan opened this issue Jun 6, 2018 · 3 comments
Closed

Ability to read/compile .MD file from installed npm module #549

randyhoulahan opened this issue Jun 6, 2018 · 3 comments
Labels
type: feature request Request to add a new feature version: next Planned to do or already included in the next(1.0.0) version

Comments

@randyhoulahan
Copy link

Feature request

Ability to read/compile .MD file from installed npm module so that the docs with respect to a component being showcased can live in a different repo.

What problem does this feature solve?

So components docs can be in the same repo/package as the component it describes.

What does the proposed API look like?

Perhaps:
import CompDoc from 'installed-npm-package/README.md'
At which point the file is imported as the main template.

How should this be implemented in your opinion?

<script> import CompDoc from 'installed-npm-package/README.md' export default{ template:CompDoc } </script>

Are you willing to work on this yourself?**

Yes but would like affirmation on suggested implimentation.

@yyx990803
Copy link
Member

This is actually a useful feature that can be included in core. Essentially we can use a markdown file to "redirect" to another markdown file.

But this may also overlap with / can be solved by what @ycmjason has been working on in #227

@ycmjason
Copy link
Contributor

ycmjason commented Jun 6, 2018

@yyx990803 ya, I think I could assume non-relative path to be rooted at node_modules. Then you could probably do something like

<!-- include installed-npm-package/README.md -->

@ulivz
Copy link
Member

ulivz commented Jun 7, 2018

This could also be solved by the plugin's option additionalPages.

  additionalPages () {
    return [
      {
        // This will override the default `/guide/`
        route: '/guide/',
        path: path.resolve(__dirname, '../../node_modules/guide.md')
      }
    ]
  }

@ulivz ulivz added the type: feature request Request to add a new feature label Jun 9, 2018
@ulivz ulivz added version: next Planned to do or already included in the next(1.0.0) version and removed plugin scope labels Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature version: next Planned to do or already included in the next(1.0.0) version
Projects
None yet
Development

No branches or pull requests

4 participants