Static Site Not Loading Correctly in Object Storage

I was wondering if someone could help me with getting my static site to show correctly on my object storage URL.

I am using the ReadtheDocs theme from mkdocs as my static site generator. The static site loads perfectly locally. I sync the files using s3cmd sync . s3://<my bucket>

After searching thru Linode videos and forums, it appears that my object storage is not seeing my css files. However, my css files are in my bucket on my object storage server.

I have tried syncing from my main project directory, which is ~/ReadMyDocs and ~/ReadMyDocs/site and neither seem to resolve the issue.

My mkdocs.yml has been the following:

Option 1

`site_name: ReadMyDocs
nav:

  • Home: index.md
  • Commands: commands.md
  • About: about.md
    theme: readthedocs
    site_dir: site/
    extra_css:
  • css/theme.css
  • css/theme_extra.css`

Option 2

`site_name: ReadMyDocs
nav:

  • Home: index.md
  • Commands: commands.md
  • About: about.md
    theme: readthedocs'

NOTE My apologies for the formatting of the mkdocs.yml file, but I know they are correct because they work.

Thank you,
Michelle

1 Reply

Hi Michelle,

Thanks for posting this. I'm adding some tags to give it some more visibility to the Object Storage experts here in the Community.

Since I've not run into this issue myself, I did some searching online and came up with a page that might help. It states the following about S3 storage (our Object storage is S3 compatible storage) not recognizing CSS files:

amazon S3 sets the content-type of css files to binary/octet-stream

It also links you to a solution page, but that link isn't working. The comments on the first solution give you the gist of what that link stated, so check those out and let me know if it works:

Amazon S3 static website doesn't serve css or js files

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct