If that is working, but replacing localhost:8080 with ipfs.io doesn’t load the index.html file, you’re having some troubles with getting the public gateways to reach you. Make sure no firewalls are blocking port 4001 and it should be working.
If you can’t load locally added files from the gateway, something with your connection is not allowing IPFS to work properly and IPNS is probably not gonna work very well then either.