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

[pv-stylemark, assemble-lite] components/ output isn't usable outside the stylguide #237

Open
mbehzad opened this issue Jun 25, 2024 · 0 comments

Comments

@mbehzad
Copy link
Contributor

mbehzad commented Jun 25, 2024

In the previous assemble / stylemark setup, component markup were generated twice, once in the components/ folder and once in lsg_components/ with optionally different setup, this included different templates (lsgTemplatesSrc vs. lsgTemplatesSrc) and different data (any data file in the layouts folder (cdTemplatesSrc) were only applied when the components/ markup was generated).

after the new stylemark implementation, same markup is used for components/ and also in styleguide/. The issue with that is that any relative paths can only work in one output. But there is use cases for both outputs, styleguide/ as the living styleguide and components/ for example for testing.

To fix this, a solution can be to generate the styleguide output with the same folder structure as the html that are read from target/components/ folder.
e.g. for foo/bar.md's ```html example-1 ./demo/test1.html the markup file will be created as styleguide/foo/demo/bar-example-1.html instead of styleguide/bar-example-1.html.
This ensures that the html files have the same depth in both components/ and styleguide/

The other thing is that having data files in the layout directory that are only applied to the compotes output and not pages is not intuitive. assemble-lite also does not support any data in form of yamel front matter in the layout hbs files themselves. currently there isn't any lsg layout folder anymore, so to distinguish between component data and pages data, it would make more sense to allow data files in the pages/ folder that are only applied to the pages when they are generated. and not to the components. This way still it would be possible to provide for example different pathPrefix to pages and component as it was before, with the difference that the default data will be then in the components/ and the pages/ can overwrite it with its data.

mbehzad added a commit that referenced this issue Jun 25, 2024
…s in components/

this will allow same relative paths in the html to work in both scenarios (directly in componets
e.g. for tests and in styleguide)

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

No branches or pull requests

1 participant