-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images in Page "index" directories don't work like normal post_asset_folder's #4236
Labels
bug
Something isn't working
Comments
{% asset img%} is used to solve the relative path between home and post, but this problem does not exist in page. You can directly use the most common markdown syntax. |
Thank you, yes that works fine.
The images can’t be in the index folder created by the command to resolve relatively for markdown syntax to work well. Is there any use for these “index” directories that are created by the command? If they should probably be removed from the page creation command. Their behavior is inconsistent.
…On Apr 11, 2020, at 1:20 AM, Mr.J ***@***.***> wrote:
{% asset img%} is used to solve the relative path between home and post, but this problem does not exist in page. You can directly use the most common markdown syntax.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I don't understand what you mean, see this example.
if you want to use those assets in ![](some-pic.png) |
Your example makes sense, but that's not what hexo is doing for me. The
"hexo new page <page>" command is creating a directory tree like this:
├─source
│ ├─example-page
│ │ ├─index.md
│ │ ├─index
The "index" there next to index.md is a directory it's creating.
Presumably because I turned on asset folders in the config.yml. So
either putting images in source/example-page/index/some-pic.png should
work, or it just shouldn't create that index folder (likely a bug and
the best fix).
…On Sun, Apr 12, 2020 at 2:55 AM Mr.J ***@***.***> wrote:
I don't understand what you mean, see this example.
├─source
│ ├─example-page
│ │ ├─index.md
│ │ ├─some-pic.png
if you want to use those assets in page, just common md syntax
![](some-pic.png)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4236 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLESNYBLXZA7GFF46DIMATRMGFZBANCNFSM4MFZTCCQ>
.
|
2 tasks
I think that the index directory should not be created. |
SukkaW
pushed a commit
that referenced
this issue
Jun 5, 2020
…older is true (#4258) * fix post_asset_folder on page * fix createAssetFolder * Fix test case
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
post_asset_folder: true creates asset folders for pages that work
Actual behavior
post_asset_folder: true creates a folder named index in the root directory when you run the $hexo new page command (//index) but this folder does not work like the other asset folders.
How to reproduce?
Environment & Settings
Node.js & npm version
Windows 10 64
Node v12.10
NPM 6.10.3
The text was updated successfully, but these errors were encountered: