0

While docusaurus offers full control over the content/structure of the document (pages/docs), this control is embedded inside an uncontrolled (DOM) parent.

If for example I want to have different padding to the entire page but only for the index page, I have no way to do so other than change the value using javascript.

Isn't there a way to somehow insert the document id into the DOM, something like:

<body id="document_id">

Or class= instead?
Or, is there any other way for me to write specific css rules or js logic for specific pages?

Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299

1 Answers1

0

Docusaurus maintainer here! Sorry for the late reply. For the root of index pages, there's the homeContainer class by default. Could you add your padding there?

Yangshun Tay
  • 49,270
  • 33
  • 114
  • 141