0

I have several projects that use the readthedocs theme that I'm hoping to can share a single _static folder location. It's two levels up at ../../_static. Is it possible to set this easily? What I've tried:

  • various conf.py settings such as static_file_path
  • changing all the _static paths in the template files to ../../_static

The latter method gets close but still leaves me with:

<script src=<"_static>/jquery.js"></script>
<script src=<"_static>/underscore.js"></script>
<script src=<"_static>/doctools.js"></script>
<script src=<"_static>/language_data.js"></script>

Those paths are dynamically generated and don't appear in the templates. I've tried to find the source in layout.html (probably 'pathto') without success.

Any ideas?

mzjn
  • 48,958
  • 13
  • 128
  • 248
Ben Rogers
  • 21
  • 6

2 Answers2

1

Adding .nojekyll file, as sometimes suggested, only tells github not to apply its own templates.

Anyway, I figured this out a long time ago. Just change a couple of paths in config file and change all the paths in layout.html. There maybe other ways, but that method works for me. Here's a live example where 10 separate projects share _static: https://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/index.html

danronmoon
  • 3,814
  • 5
  • 34
  • 56
Ben Rogers
  • 21
  • 6
0

The easiest way is to add an empty .nojekll file under the html directory

frzhen77
  • 21
  • 4
  • Why would this help? Adding a `.nojekyll` file (note the spelling) is a solution to a different problem: https://stackoverflow.com/a/39691475/407651 – mzjn Nov 28 '22 at 08:50