Closed qlitre closed 3 years ago
If I understand your question correctly, you would just generate the static site and then host the files somewhere (any static web server like nginx, or via a build system like github pages, netlify and the like). Typically the flow distill was designed for was:
runserver
distill_path
It's not much more complicated than that. Are you trying to do something else here?
I understood that that the distribution of static files is done by the settings on the web server side. thank you.
Let me check at the end.
Do I need to do anything more special about 2. Wrap all the URLs in distill_path
?
No not really, pretty much if your site works locally as you want it to under the local runserver
dev server and distill-local
writes your site out to a directory locally you're pretty much done with integrating with distill. All distill does is loop through any URLs registered with distill_path
then render the output HTML and then saves it to disk. From your pasted code it looks like you've already done that so you should be generating a fully working static site and be good to go.
If you want your site to rebuild automatically if you edit content on your remote CMS you'll have to look at webhooks to trigger a build somewhere or something of that nature.
Thanks your reply. I was able to deploy to Netlify and deliver the files in dist. But I stumbled upon updating the dist file. I will check it a bit more.
Thank you for your kind support.
Not a problem, glad you find the library useful. I'll close the issue for now but feel free to re-open it or create another one if you need any further pointers.
Hello. I'm trying to create a Django blog site using a headless CMS. Today I found django-distill and succeeded in generating static html files.
I don't want to send a GET request every time I render, so I'm thinking of using django-distill. How can I display the statically generated site when I run python manage.py runserver? Is the static site delivered after deployment in the first place? Sorry for the rudimentary question.
I'll paste the source code that I think is relevant below.