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

When deployed, a styleguide doesn't show active states #295

Open
Wolfr opened this issue Feb 22, 2019 · 2 comments
Open

When deployed, a styleguide doesn't show active states #295

Wolfr opened this issue Feb 22, 2019 · 2 comments

Comments

@Wolfr
Copy link
Contributor

Wolfr commented Feb 22, 2019

When deployed on a web server, a styleguide doesn't show active states. Probably because pathname as a variable does not exist during the build, thus the code just doesn't output.

@Wolfr
Copy link
Contributor Author

Wolfr commented Feb 26, 2019

This is probably because pathname is a variable that exists within Express (the server), but when a page is built, the pathname does not exist.

@Wolfr
Copy link
Contributor Author

Wolfr commented Feb 26, 2019

To further debug this we can check if pathname exists on the “built” version as it exists in the “Express” version.

Logic:

"styleguide/docs/" + doc.attributes.filename       # styleguide/docs/typography
==
pathname                                           # styleguide/docs/typography

Template:

| #{doc.attributes.filename}
| #{pathname}
| #{doc.attributes.title}

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

1 participant