Skip to content
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

include_code link and root config #928

Closed
smmoosavi opened this issue Nov 20, 2014 · 2 comments
Closed

include_code link and root config #928

smmoosavi opened this issue Nov 20, 2014 · 2 comments

Comments

@smmoosavi
Copy link

when i change root config, download link of include_code dose not work correctly

_config.yml:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /test/
permalink: :year/:month/:day/:title/
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
permalink_defaults:

# ... other configs

source/_post/My-New-Post.md:

title: My New Post
date: 2014-11-18 22:11:46
tags:

---

{% include_code test.html lang:html test.html %}

download link in page: http://localhost:4000/downloads/code/test.html

expected download link: http://localhost:4000/test/downloads/code/test.html

and console: GET /downloads/code/test.html 404 2.802 ms - 37

extra info:

  • theme: landscape
  • version: hexo: 2.8.3
@Xuanwo
Copy link
Contributor

Xuanwo commented Dec 1, 2015

@smmoosavi How about in the newest version?

@NoahDragon NoahDragon added this to the 4.0 milestone Apr 6, 2017
@NoahDragon NoahDragon mentioned this issue Apr 6, 2017
53 tasks
@curbengh
Copy link
Contributor

should be resolved by now

const caption = `<span>${title}</span><a href="${ctx.config.root}${codeDir}${path}">view raw</a>`;

Feel free to reopen otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants