How can one add Google Fonts(i want to do Poppins ...
# javascript
a
How can one add Google Fonts(i want to do Poppins lets say) to KotlinJS. I couldnt find any link tag that could be added to import the fonts. I am using Kotlin MPP.
b
Add it in your index.html
a
i am writing in pure kotlin and do not have any
index.html
the jvmMain has a
HTML.index()
function
b
Every web site comes over the wire as HTML. Wherever that is for your project, add the google fonts links
a
yes, but apparently Full-Stack web appliaction Idea template does not have any index.html as the entry point
b
It does. It's just generated by the server via kotlinx.html
It's impossible to create a website without index.html
a
yes got it i had to template the css in the index() function only by addin
link(href="...")
altho i still dont find any generated
index.html
as such in the template. I guess the
kotlinx.html
generates it in the build
b
No, it generates it at runtime upon request. No file is ever actually created.
a
right! thanks
👍 1