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
How to provide files users can download? #1724
Comments
Put the pdf in your |
Ok cool! So I put my file in Kind of a silly question but thank you for your help |
Yes putting the file there (and of course So if you want to add the PDF as a link in a post, it's very easy, just link to it using markdown. Say you've put
However, it sounds like you may want to put the link on your front page or in a sidebar or something. How you do that is not up to hexo but rather up to the theme you are using, but basically, you will need to edit the right file in the theme, probably somewhere like |
Ok awesome! I will post updates from trials and tribulations here. Great job with the hexo.js project. Much simpler and easier to get started with than its competitors! Here is another SO link for reference: http://stackoverflow.com/questions/2793751/how-can-i-create-download-link-in-html |
Heh, fwiw I'm not affiliated with hexo (other than writing some documentation and a little plugin) but yes I like it a lot too. As for the links, understand that Hexo is at its core about writing markdown files which then get converted into HTML by Hexo. You can put HTML in your articles by wrapping them in the When editing the layout files (for changing the sidebar or other non-article parts of the site), you usually won't be using plain HTML and JS either - most themes use either EJS or Jade as templating engines. It's not hard to learn (just check the relevant documentation) but you should know this or you will waste a lot of time trying (and in the case of Jade, failing) to put those plain HTML and JS snippets from SO in there.. |
I have a link for my file but how can i write it in markdown to download directly rather then opening it a browser and then save as download. any clue? |
I would like for people to download my ebook. It is a pdf file. So when users click a link I would like them to download a pdf. How do I do this with hexo.js?
The text was updated successfully, but these errors were encountered: