I am trying to deploy a website on S3 using wercker. So I have a git repo with the config.toml and the wercker.yaml.The build goes fine on wercker with all the files I can see them on S3. When I hit the website I get an error like this for all my js ,css and img files: net::ERR_CONNECTION_TIMED_OUT
I’m not seeing anything in your html <head>, first of all, but that’s not the the issue here…
The problem is that I have no access to your S3 account, but when you check the bucket, is everything pushing to the account correctly? I believe that you can check your files from within the AWS UI?
I do see all the files under the bucket from the UI. I can see individual files too and its contents(js and css). Bu t it times out saying not reachable.
Perhaps this is caused by your bucket policy? If I visit your website now, I get a 403 forbidden error message. See here for the bucket policy needed for a static website hosted on S3.
Currently I am not able to deploy because I get an error saying bucket not found when deploying from Wercker. Let me fix that and I shall update it here accordingly.
You’re on the good track; I can visit your webpage now without the 403 error.
I see that main.css, pygments_highlights.css, and highlight.min.css still trigger a 403 error. If you’re stuck, you can try to remove those files from the bucket and re-upload them. It might be that they were uploaded with the wrong access policy, since your index.html did succeed in uploading and being publicly accessible.
Not sure if we’re on the same page here. The base url that I mentioned in my previous post doesn’t have to do with how your folders and files are structured. Instead, the base url is simply the root address of your website (http://www.example.com) and sort of the entry point of your folder structure.
Or do you want me to show something else with your screenshot? From my standpoint, it looks okay and comparable to my S3 buckets. (firstpost is a bit of an odd folder though, but if that’s something you want, then Hugo is flexible enough to do that.)
What seems to be missing from that tutorial is configuring the S3 buckets: the tutorial you link only discusses creating a user and IAM policy. While important, I also think you’ll need to configure your bucket to serve a website. See this tutorial for that, particularly step 1 & 2.
The reason why I still think you need to configure your bucket for static website hosting is that your website should not be accessible at https://s3.amazonaws.com/www.stencilled.me/index.html . That’s because you cannot use a DNS record against that address to resolve www.stencilled.me to that file location.
Your wercker config file looks okay (though you do use an old version of Hugo, but that may be deliberate for some reason), and your config file points to the wrong base url.
Using relURL and with my exact example in your templates?
Do you have relativeURLs set to true in your site config?
Your assets (in this case, your .js files) are not being ported over correctly because you have something set incorrectly in your configuration and/or templating; i.e., the browser is currently looking for a directory called www.stencilled.me…which doesn’t exist.
I would recommend contacting the theme’s author since this is going to inevitably cause others trouble the same way it has for you; better yet, submit a pull request.
You need the full URL, including protocol, in your site’s configuration file for your baseURL
Copy everything in this file over to a new file at layouts/partials/footer.html and then change lines 199&200 to what I mentioned above: