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

Trying to insert images in .md files in _texts #54

Open
binipringle opened this issue Apr 23, 2020 · 1 comment
Open

Trying to insert images in .md files in _texts #54

binipringle opened this issue Apr 23, 2020 · 1 comment

Comments

@binipringle
Copy link

binipringle commented Apr 23, 2020

I created a folder called img in assets, and I put something like this in the kramdown file:

![tulip](/assets/img/tulip.jpg)

but my image doesn't display. I think I have to change something in default.html and maybe something in a css file but I'm not sure where. I'm pretty new at this.

And thank you for creating Ed. I love it.

@binipringle
Copy link
Author

I figured it out.

  1. After creating a folder called img in assets, I put tulip.jpg in the img folder.
  2. I added kramdown syntax in _config.yml for inclusion of images:
defaults:
  - scope:
      path: "assets/img"
    values:
      image: true
  1. I adjusted the width and borders of images in _ed.scss
  2. I added this code to the .md file:
    ![worddoc]({{"/assets/img/tulip.jpg" | absolute_url}})

I realized that the thing I had been doing wrong at first was not including the absolute url. It looks great now!

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

No branches or pull requests

1 participant