Eleventy static site generator with strapi CMS - content-management-system

I am new in website development using Static site generator and Cms, I am developing one static website using eleventy SSG and Strapi CMS.
All my contents are stored in CMS.
(I Assume all you know about SSG and CMS). Now I have doubt about contents, suppose, I update my contents then it will automatically reflect in my static site without restarting eleventy server or should I restart my eleventy server.
In my current project, When I update my contents using CMS, My site not updating their contents but if i restarting my eleventy server then it is updating.
Is it right to restart eleventy server after update contents or is there any way available to update contents on website without restarting eleventy server.
Please guide me.

SSG involved that content is "statically rendered" to static files. So, you need a mechanism that fetch new content from Strapi and adapt your files or your displayed content.
Here are some ways to do it:
Restart Eleventy server (but it causes downtimes)
Fetch fresh Strapi content using frontend code (but it could be slower and bad for SEO)
Do not use SSG if your content is often updated. Prefer more flexible tools like NextJS or Remix that handle SSR or hybrid behavior.s

This may not be a straightforward answer.
Anyway,
I am using Eleventy as a Static site generator.
So, I have installed #11ty/eleventy using npm.
This restarts my eleventy server everytime I make change and logs the errors if I have one.

Related

Getting requests only in one computer in UmbracoApi

I have a Umbraco API project that using the UmbracoCms library V 7.15.3. The project work properly, but from some reason after that i copy the project to another computer. The API stop to work there and requests did not comes to the controller.
Is there a reason for something like this to happen?
Umbraco gives you a web application which you need to install and setup somewhere before it will work.
You probably used their installer initially which created an IIS website and a database for you. You don't need to re-run the installer, but you do need to copy the database and all the files and re-create the website in IIS on the other computer.
Simply moving files around is not enough.

App Engine localhost publication from eclipse-photon

I had been working on Google app engine for some time with great success. However, recently I was forced to upgrade to Eclipse-Photon from Eclipse-Mars.
I can run a debugging version of the server on localhost:8080 just fine except when I change any of the TypeScript files. Formerly when I would run the TypeScript compiler to generate new JavaScript the server would automatically update the server. Now when I generate a new JavaScript file, the server continues to serve the old version. I have my expirations set to 0 and I have automatic publication turned on.
For a while I could make it work by telling the server to Publish. Now that has stopped working as well. If I save any file from inside of Eclipse I see a little message flash by indicating publication and then that file serves properly. If I load the generated JavaScript file and then modify it slightly then it will publish and serve correctly.
Obviously Photon is no longer tracking file changes that way that Mars did. I could easily copy the generated file to the correct place if I knew where that place was.
Are you running your TypeScript compilation from outside of Eclipse? If so, try doing a Refresh of your project. That should sync up Eclipse's notion of the filesystem state with what is on disk.
Cloud Tools for Eclipse relies on the Web Tools and Resources frameworks to determine whether a resource has changed and needs publishing. Eclipse is normally set up to detect resource changes automatically as configured by two options on the Preferences > General > Workspace preference page: Refresh on access and Refresh using native hooks or polling.

A good development workflow for static sites with one or two PHP files?

so I'm still learning a lot about best practices and local development workflows when working on my web projects. At the moment, when I develop a static site locally I tend to use Grunt + Bower + some static site generator to start up a local server really quickly. On the other hand when I'm working on a more PHP focused project I will set up a Vagrant box, depending on the focus. My question though is what is the best way to locally develop static sites that have one or two PHP files within them, such as a handler for a contact form? I can't run the PHP on my local server under grunt (at least as my current workflow stands — I use the browsersync plugin — is there a way to do this?), but using Vagrant seems like overkill, especially sometimes when I've settled into using a static site generator, and later realise I need to write a server side script.
You can use nginx to reverse proxy requests to your localhost (your machine). This would route *.php to other IP (a vagrant machine just for those two PHP that happened later) and all other static request to you local grunt server.
With this setup your development site would ever be in http://localhost/ or http://localhost:xxxx where xxx is some port. But, depending on the target requested (php, jpg, html, etc) the request will be routed to right place.

Deployed MVC4 application not opens completely

I deployed MVC 4 application to Arvixe.com hosting. In local everything is okay, site opens full, but after deploying, site opens, but, not full. css, jquery, javascript is not working. Only html tags seem.
Arvixe support send this to me: How to Bin Deploy ASP.NET Assemblies on Shared Servers. But I can not understand it well. Can anybody help me to find that why site does not open full? What shloud I check to solve this?
When linking your views and resources you should use relative paths
instead of
"Views/MyView.aspx"
use
"~/Views/MyView.aspx"
This is valid for all resources in your application and it is know to cause these problems.
When working locally the paths are correct since it's all resolved to your computer.
In a web environment you will have to use the relative path so the url is resolved in front of all your resources.

Google App Engine: Deployed Source doesn't have Local updates

I'm working with Google App Engine in Eclipse w/ JSP pages in Windows 7.
I already have an app deployed and working, but I am unable to make changes to it for some reason.
If I make changes and debug locally, my localhost page is showing the changes that I implement.
While I am not getting any errors in the deployment, the same changes that work on my local debug are no longer showing up, so I can't update my app.
I thought updating the version number might help, but I had no luck with this.
Any ideas? Thanks.
Are you deploying the same version (as specified in appengine-web.xml) as the default version that is running on your app? If not, you'll have to access your new deployment at http://newversion.appname.appspot.com, or change your default version in app engine to your newly deployed version.
I have had the same problems too, especially when the changes concerned the static pages. Some little things to check:
If you have set an expiration date in your app.yaml, your browser cache could be holding the file.
If it’s specific to the online contents, it could be an intermediary cache (such as a squid server) serving the outdated contents, in which case you’d have to flush the cache to get the new version.
You could start by checking the log on the GAE console to see if the request is received by the server, that would help you debug.
Another trick, if you’re being served an outdated version of http://yourapp.appspot.com/index, try and pass a dummy argument to force the browser to update the version, for instance : http://yourapp.appspot.com/index?p=1