hexo icon indicating copy to clipboard operation
hexo copied to clipboard

Keep generated static assets in source folder

Open plankguy opened this issue 12 years ago • 3 comments

Hi, i'm wondering how to generate static assets such as css, js, images to a different folder structure than what's in for instance the landscape theme:

├─ source
   └─ css
   └─ js

Generates to:

├─ css
└─ js

Is there a way to keep those assets in a folder when generated? Ideally i'd like to get to this for both theme and generate public folder structure:

├─ static
   └─ css
   └─ js
   └─ etc...

plankguy avatar Sep 01 '14 21:09 plankguy

You can create a new folder named static in source, to make the structure look like this

├─ souce
      └─ static
            └─ css
            └─ js
            └─ etc…

Just need to modify your ref routes in your theme.

Xuanwo avatar Sep 07 '14 23:09 Xuanwo

But can I rename the source folder, to say assets? I assume source_dir is meant only for the source folder in a hexo project root?

plankguy avatar Sep 08 '14 04:09 plankguy

yes, only source.

Xuanwo avatar Sep 08 '14 05:09 Xuanwo