M
M
Mykhailo Nikolaiev2020-09-27 15:27:41
HTML
Mykhailo Nikolaiev, 2020-09-27 15:27:41

Why doesn't it render svg on GitHub?

Locally everything works, but if you put it on GitHub, then svg does not render

<a href="#" class="team__card--link">
   <svg class="teem__card--icon teem__card--icon-1">
     <use href="./img/icon/sprite.svg#facebook"></use>
   </svg>
 </a>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Mikhailov, 2020-09-27
@Psixodelik

How is the svg inserted? If with , then check the file path with a web inspector (like Chrome DevTools) <img>

G
GrayHorse, 2020-09-27
@GrayHorse

Because "hosted on GitHub" is wrong.
You need to publish to GitHub Pages, not GitHub. A repository is being uploaded to GitHub, which needs to be deployed to GitHub Pages.
Stop using htmlpreview.github.io, deal with GP.
Was it really impossible to watch on Youtube in 3 months how it is done? Instead of creating the 4th topic in 3 months with noob problems with deployment on GitHub Pages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question