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

Automatically inject css for a md page #202

Closed
tleunen opened this issue Mar 21, 2016 · 4 comments
Closed

Automatically inject css for a md page #202

tleunen opened this issue Mar 21, 2016 · 4 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more.

Comments

@tleunen
Copy link
Contributor

tleunen commented Mar 21, 2016

Sometimes, a markdown page requires specific css that we might not want to initially load. It would be great if gatsby could automatically load the css based on the filename.

For example, it could be this syntax:
pages/sub/doc.md --> load pages/sub/doc.css
pages/sub/doc/index.md --> load pages/sub/doc/styles.css

What do you think?
This is not required for js pages because we can import the css inside the js.

@KyleAMathews
Copy link
Contributor

Very interesting. It'd also need to support styles.(sass|scss|less|*) for each preprocessor out there.

Has anyone else out there wanted something like this? Is there other static site generators that have a similar pattern?

@ColeTownsend
Copy link
Contributor

@KyleAMathews it's doable with yaml in jekyll, it's nice for custom pages.

@stale
Copy link

stale bot commented Oct 22, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 22, 2017
@stale
Copy link

stale bot commented Nov 7, 2017

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Nov 7, 2017
ChristopherBiscardi added a commit to ChristopherBiscardi/gatsby that referenced this issue Jun 27, 2019
* Made componentWithMDXScope a no-op. It is deprecated and doesn't
  need to be used any more. MDXRenderer is still required for previous
  uses that required it.
* Scopes are now imported via custom webpack loader
  - TODO: rename mdx-scopes to the loaders dir
* Scopes are now merged into a single scope and injected into
  wrapRootElement on both SSR and Browser renders
* Querying code.scope is now a no-op
  - No files are written when this happens
* Relative path import support is added to all MDX Nodes

closes gatsbyjs#214 gatsbyjs#202 gatsbyjs#133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more.
Projects
None yet
Development

No branches or pull requests

3 participants