I'm using tailwindCSS for a simple html site but deployment on netlify does not work, why? - web

I've been learning how to use tailwind css by following the offical video tutorial and I just wanted to try to deploy the site example to Netlify to see if it works using the drag and drop feature.
This means taking the entire project folder and dumping it into netlify. This usually works with vanilla html css js sites but for some reason I get the error
Page Not Found Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
This is how the project structured looked like:
What am I doing wrong? Inside the build folder there is another file called tailwind.css

On your Netlify dashboard, change the publish directory to the directory where your index.html file resides: public/. That should do it.
You can also, as you said, take everything out of the public folder and put it at the same level as the other folder and files, which makes the index.html available at the root of the project. However, then you lose your project's file organization.

I've fixed the problem.
The trick was to take everything out of the public folder and put it at the same level as the other folder and files.
This would make the index.html file available at the root of the project and would allow the site to work properly once deployed.

Related

Flutter web svg image will not be displayed after Firebase hosting

Svg images do not appear after hosting. Consolos scan shows that svg files are downloaded. But it doesn't appear. Can anyone help me with this?
I have already built the web app in both html and canvaskit, but it doesn't work in either. I can only see the svg images on localhost.
I use the https://pub.dev/packages/flutter_svg package.
I use a Firebase hosting service.
enter image description here => localhost
enter image description here => hosting
In my case I needed to put the full path name (i.e. include 'assets/'):
SvgPicture.asset('assets/path/to/file.svg')
I found a solution to diplay the current svg/png correctly after Firebase Deploy.
There's something wrong with flutter after we run flutter build web. The respective assets, should be moved into /web directory (on build folder you can check items before do the deploy). But, they are not moved in.
So, in my case, I've removed all assets (png's or svg's) from the root project /assets and set them into the /web/assets folder (mannually)!
This is the automatic process that flutter do after you run flutter build web.
Just pay attention with the declaration of the assets in the pubspec.yaml file. The files must be matching the path for the web folder.
Example:
pubspec.yaml
assets:
- assets/
using the svg icon (without the /assets):
myIcon.svg
Try it. It should work.

How to configure the server in angular to get files?

I just run the ng serve command and go to the server. But if I drop the file house.jpg into the src folder, then when I access the address http://localhost:4200/house.jpg then I don’t see this file, the main page of the project opens.
I did not find anything about it in the official documentation, I ask the help of professionals
You need to follow the Angular Structure Guide. As said above, you need to put your images and other files you want to use frontend-side in the assets folder.
The assets folder contains image and other asset files to be copied as-is when you build your application.
Notice you can create any folders you want in assets if you want to order your files.

deleted css files are accessing and web application is running those files

I made a static folder where I saved all css files to be used in my flask web development project. It is not reflecting the changes while I was doing some change .When I deleted that static folder then also it is accesing the files.
I have not clue from where it is accessing..
Please solve this problem
Thanks in advance
gallery.css file is not present:-
but accessing this file:-
try going to your project directory (not in your IDE, but the folder where the project is located)
find any/all directories named
__pycache__
and delete them.
clear all browser cache.
rerun the app in your IDE

How to make Azure App Service Web Apps serve my website out of my repoRoot/src/views/ folder as the website root?

In one of my git repos, I've got a simple HTML website with the following folder structure:
repo root:
--reference
--developer-notes.txt
--i-am-not-website-code.txt
--i-am-not-meant-to-be-served-by-web-server.txt
--etc.txt
--src
--views
--index.html
--etc.html
--content
--foo.css
--etc.css
--images
--foo.png
--etc.png
--scripts
--foo.js
--etc.js
I just created a App Service Web App on Azure, configured it to pull the source out of my repo, and deployed it.
I made sure that the Application Settings -> Default Document list had an entry for the index.html file.
However, as understood, due to my folder structure, I can only view my website if I go to:
foo.azurewebsites.net/src/views/index.html
I cannot go just to:
foo.azurewebsites.net/
and see my index.html page.
Now, I can change my folder structure by putting my HTML pages in the root, to make the website appear at foo.azurewebsites.net/. But I was wondering if there was a way to not have to do that, esp. given that every repo also stores stuff other than the source code, for example in my case the Reference folder, and most repos have the source, which only one of the many artifacts, in the source folder.
Is there?
One thing you can do is to change the virtual path for your root application to point to your views folder in the Virtual applications and directories section of your Application settings. That way you will have foo.azurewebsites.net/ serve your index.html file.
Another thing you will have to do in this case, is to set the virtual application paths for your content and scripts folders (and the reference folder if you need to access it's content from the web) since they are not under your views folder.
Given your folder structure, it would look something like this:

Kentico getresource 404 error css and js

Using Kentico 9, while I was away it appeared that something changed! While our production site appears to be working fine our staging site is not. When I try to access the staging site it is unable to "find" any of the related CSS or JS files and therefore displays the site without any of those files. Another part of the problem is that the same thing is happening in the admin portal and since the admin portal relies on those CSS and JS files to work I can't troubleshoot there.
When I try to get to the resource directly in a browser: e.g. iddba-staging.azurewebsites.net/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/Default/bootstrap.css it fails.
When I try to access it directly at the prod site: www.iddba.org/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/Default/bootstrap.css as I would expect it provides me the opportunity to save the file.
Our site(s) are hosted in Azure.
Any idea of where to turn next? Thanks.
Also on a possibly unrelated note, I have also noticed an error in the logs on staging that is not on prod:
.NET Runtime version 4.0.30319.0 - Loading profiler failed. Failed trying to receive from out of process a request to attach a profiler.
Not sure if this might be related. Thanks.
Once I realized that getresource.aspx was a dynamic file and the css and js files were either already in the database or were in respective directories it looked at the dlls that power Kentico. In this case I decided to see if there were any differences in the bin directories of prod and staging. I don't know how they became out of sync but they had. Since the problems I had appeared to be serving up CSS files I noted that one file CMS.LessCss.dll was in prod and not in staging so I copied that file in. As soon as that file was copied Kentico threw an error with the word Jurassic in it (odd!). I found a file Jurassic.dll that was in Prod and not in Staging so I moved it.
Voila! The site was back, serving CSS and JS files on the front end and in administration. We are still clicking through all our pages to see if anything else is not working but for now we are good and if I have any further questions I will look in bin first since there are still files that live in prod that are not in staging and I don't want to re-populate unnecessary files. I am just not sure how the directories got out of sync in the first place... or at least no one here has admitted to having messed around! Yet.
Thanks for all your help.

Resources