Earlier, the images/ directory was given too much prominence... all
users might not have just an "images/" dir in the "static/" dir. A
user could have multiple dirs inside their static/ dir.. but earlier
the rewrite only used to happen to static/<HUGO_STATIC_IMAGE>. That
did not look right.
This commit fixes that.
Now ox-hugo tries to be smarter in figuring out where to copy the
outside-Hugo-static-dir files to.
| =~/temp/static/images/foo.png= | =<HUGO_BASE_DIR>/static/images/foo.png= | If the *outside* path has =/static/= in it, the directory structure after that is preserved when copied. |
| =~/temp/static/img/foo.png= | =<HUGO_BASE_DIR>/static/img/foo.png= | (same as above) |
| =~/temp/static/foo.png= | =<HUGO_BASE_DIR>/static/foo.png= | (same as above) |
| =~/temp/static/articles/zoo.pdf= | =<HUGO_BASE_DIR>/static/articles/zoo.pdf= | (same as above) |
| =~/temp/bar/baz/foo.png= | =<HUGO_BASE_DIR>/static/foo.png= | Here, as the *outside* path does not have =/static/=, the file is copied directly into the Hugo =static/= directory. |
| =~/temp/static/images/foo.png= | =<HUGO_BASE_DIR>/static/images/foo.png= | If the *outside* path has =/static/= in it, the directory structure after that is preserved when copied. |
| =~/temp/static/img/foo.png= | =<HUGO_BASE_DIR>/static/img/foo.png= | (same as above) |
| =~/temp/static/foo.png= | =<HUGO_BASE_DIR>/static/foo.png= | (same as above) |
| =~/temp/static/articles/zoo.pdf= | =<HUGO_BASE_DIR>/static/articles/zoo.pdf= | (same as above) |
| =~/temp/bar/baz/foo.png= | =<HUGO_BASE_DIR>/static/foo.png= | Here, as the *outside* path does not have =/static/=, the file is copied directly into the Hugo =static/= directory. |
`~/temp/static/images/foo.png` | `<HUGO_BASE_DIR>/static/images/foo.png` | If the **outside** path has `/static/` in it, the directory structure after that is preserved when copied.
`~/temp/static/img/foo.png` | `<HUGO_BASE_DIR>/static/img/foo.png` | (same as above)
`~/temp/static/foo.png` | `<HUGO_BASE_DIR>/static/foo.png` | (same as above)
`~/temp/static/articles/zoo.pdf` | `<HUGO_BASE_DIR>/static/articles/zoo.pdf` | (same as above)
`~/temp/bar/baz/foo.png` | `<HUGO_BASE_DIR>/static/foo.png` | Here, as the **outside** path does not have `/static/`, the file is copied directly into the Hugo `static/` directory.