Comments (5)
The current situation is more complicated than I thought. Hexo's current database models Page
and Asset
are not well-suited for expressing "code" files (including not only j2
but also js
or css
files):
Assets
are not rendered, but their content is also not stored in the database (usually used for handling multimedia resources like images, but not plain text files);Pages
are always rendered, even if they are non-markdown files such as the aforementionedj2
,js
, orcss
. Typically, users do not want these files to be rendered as pages or converted to other formats (though there are exceptions, such as plugins used for compressing js files).
I have not found a very elegant solution about how to handle files in code_dir
.
from hexo.
j2 becomes html and loses the content field? (Is this normal behaviour?)
And #5121's modification resulted in an undefined exception:
hexo/lib/plugins/tag/include_code.ts
Lines 57 to 58 in 093dc2d
from hexo.
I think setting code_dir
to skip render should solve the problem. This should be feasible during the loading process in Hexo.
from hexo.
This may be related to version. v7.1.1 does not have this problem
from hexo.
#5121's modification resulted in an undefined exception:
hexo/lib/plugins/tag/include_code.ts
Lines 57 to 58 in 093dc2d
I guess that's a problem but not a critical one. code_dir itself should not be rendered
from hexo.
Related Issues (20)
- `include_code` tag is broken in Hexo 7.2.0 HOT 3
- Can't find theme when deploying hexo on github pages HOT 4
- [Bug 🐛] Table not shown when inside a quote HOT 5
- :name parameter in permalink cannot work as expected. HOT 2
- Remove bluebird HOT 1
- > Error: Spawn failed at ChildProcess. (/data/data/com.termux/files/home/blog/node_modules/hexo-util/lib/spawn.js:51:21) at ChildProcess.emit (node:events:513:28) at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) emm不知道为什么
- Insert image failed HOT 2
- Set Hexo's EventEmitter.MaxListeners to 100 HOT 5
- relative path referencing of images HOT 1
- auto_spacing: true 不起作用 HOT 2
- An error occurred while running "hexo g": no such file or directory, mkdir 'H:\blog\public\:' HOT 5
- Filters do not allow adding new properties to posts HOT 2
- 代码片段中 HTML 片段会被渲染成 HTML,升级7.3.0后无法构建。HTML fragments in code snippets are rendered as HTML and cannot be built after upgrading 7.3.0.
- After Enabling "post_asset_folder: true", Only One Format of Posts Can Be Rendered HOT 3
- markdown文件里的HTML标签不会被正确地渲染 HTML tags in markdown files are not rendered correctly
- Support to load ES module plugin HOT 6
- hexo init出现错误
- 如果能够支持主题内部的TS编译就太好了 HOT 1
- Hexo does not load workspaces plugins
- Add support for pnpm/package.yaml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo.