Eleventy: How to deploy to something other than Netlify or GitHub pages?

Created on 26 Mar 2020  Â·  12Comments  Â·  Source: 11ty/eleventy

I have a hosting account I want to use, and I know how to FTP stuff, but simply uploading my 11ty folder doesn't do what I expected. I can open the homepage, but all links are dead, there is no css, js and no images. My existing blog is hand written static html and works just fine on that server.

I am entirely new to SSG's and I must be misunderstanding something very basic. I have found nothing in 11ty docs to shed light - they are perhaps not (yet) very beginner-friendly.

In short: How do I deploy my site with everything working as well as it does locally?

education

Most helpful comment

So: I think I nailed it now. Turns out I hadn't put things in the root, but one folder down (doh). Then I had some paths without trailing slashes: /about instead of /about/. Finally, I had folders with title-case: "About", but the corresponding paths were lower-case: /about/. All these things fixed, it finally works: http://chfrom.dk/
So, not one - but several mistakes. Learned a lot from this one. Thanks to all of you - I'm closing this one down. :-)

All 12 comments

Hi, @HagelBagel! Welcome to Eleventy! Do you have a link to a repository to share? I can take a look.

How do you build the site? (what command)
How do you synch the output folder?

That's why services like Netlify, ZEIT Now, or buddy.works (if you need to automate FTP deployments) exist, that deployment step should be set up and automated.

@reubenlillie Here's my repo: https://github.com/HagelBagel/11ty-test-blog
@DirtyF: For building: "npx eleventy". I am not sure what you mean by synching the output folder? Like automated deployment? I only tried regular ol' FTP.

When you run npx eleventy it will generate an output directory (by default called _site). You need to put the content of that directory onto a webserver (e.g. using FTPS). That's what is called „deployment” (= transferring files from where they were generated to the machine which shall serve them)

For example, I am using Uberspace and build the files there locally before copying the output directory onto the document root defined with Apache.

@HagelBagel As your site is deploying fine on Netlify: https://5e7cb5f8578654018cf1420b--sleepy-carson-e1b1e4.netlify.com, so I'm not sure why it would not be OK to be uploaded somewhere else. 🤷‍♂

Hi @Ryuno-Ki - that's exactly what I have been doing: simply copying the files to my server. But perhaps something is going wrong in that process.
@DirtyF: thanks for testing!
It's probably just a dumb mistake I'm making - at it again ;-)

@HagelBagel Would you be able to share a link to the server you're FTPing it to? This way we could check the links.

I can open the homepage, but all links are dead, there is no css, js and no images.

If I understand you correctly, this is your main problem (not the upload).

So: I think I nailed it now. Turns out I hadn't put things in the root, but one folder down (doh). Then I had some paths without trailing slashes: /about instead of /about/. Finally, I had folders with title-case: "About", but the corresponding paths were lower-case: /about/. All these things fixed, it finally works: http://chfrom.dk/
So, not one - but several mistakes. Learned a lot from this one. Thanks to all of you - I'm closing this one down. :-)

Hooray!

Will you blog in Danish or English? In any case, don't forget to generate a RSS feed :-)

I will be writing in English, but I will probably put my old site back up while I work on this new 11ty thing of wonder, adding RSS and all kinds of goodies ;-)

Microformats *_*

Okay, I'll keep an eye on the site then :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michrome picture michrome  Â·  3Comments

AjitZero picture AjitZero  Â·  3Comments

nilsmielke picture nilsmielke  Â·  4Comments

smaimon picture smaimon  Â·  3Comments

michrome picture michrome  Â·  3Comments