Need use partial helper
jiangtj opened this issue · 4 comments
Can you add not only replace files, but also new files?
I need custom new *.swig files
@jingxinxin
Yes, you can add new *.swig files as layout, but you must load it by partial.
https://hexo.io/zh-cn/docs/helpers#partial
This plugin only use hexo.theme.setView
, see https://hexo.io/zh-cn/api/themes
@jiangtj But I don't wanna modify the files in theme path. Can I add new *.swig files to the path of source/_data?
I saw your PR in NexT. So I may understand your purpose.
Although I wrote this plugin for NexT at first, it doesn't work well now.
Because NexT uses include
import
and extends
, not partial
.
You can try copy page.swig
to outside. Modify this page.swig
to include/partial the new layout.
You will encounter some path error and have to fix it.