mvolpato / ishouldgotosleep

Comments to articles at flutternewsletter.volpato.dev (formerly ishouldgotosleep.com) and volpato.dev
https://flutternewsletter.volpato.dev/
1 stars 0 forks source link

posts/publish-swift-static-website-gitlab/ #29

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Publish a Swift static website on GitLab Pages

How to host your static website for free. Generate the static pages using Swift Publish and host on GitLab Pages.

https://ishouldgotosleep.com/posts/publish-swift-static-website-gitlab/

emrdgrmnci commented 2 years ago

I used CasperishTheme like you but it broke my Publish theme style.

https://emrdgrmnci.gitlab.io/emrdgrmnci.github.io/

mvolpato commented 2 years ago

Hi @emrdgrmnci

Try changing, in your main.swift file:

var rootPathString = "emredegirmenci"

to

var rootPathString = "emrdgrmnci.github.io"

Also, be careful, you have a branch in your repo (main) with a private key in it.

emrdgrmnci commented 2 years ago

Hi @mvolpato,

I created this web-site reading your articles and others. But my images don't see in web page.

I already add them under Resources file. Do they show after git push command?

It shows cracked link.

mvolpato commented 2 years ago

Hi, your images are in the root of the website. When you reference them in your HTML you need to use /imageName.ext.

For instance you now have

and it should be