My project is NuxtJS based.
I've been searching but couldn't find anything. In accordance with the working principles of my project, I pull images from external websites to my website via URL.
However, this creates problems in the Lighthouse reports. This is the error: "Serve images in nextgen formats".
Maybe it's silly, but is there a way to publish the images we take from websites in WebP format?
You can use API services.
They will Convert them automatically for you. but it is only possible if you have a backend side for your website, doing this in frontend is pointless.
Related
I am currently looking into static site generators.
I build a testing documentation site with Vuepress and am now fiddling with going into the live operation.
i don't want to publish my files to services (GitHub Pages, Netlify etc.) but I want to host it on my own server.
Generating static html sites everytime I add markdown pages or change the content is not an option.
Is there a way to host Vuepress (or maybe similar markdown generators) where I just need to upload the .md files and everything goes automatically?
There are two basic ways to use markdown as your website...
use a live server:
In this scenario, each request is processed by a program which retrieves the markdown text and does some pre or post processing (templateengine, formatting etc).
This could be a simple CGI script, a web framework or a custom server.
use a static site generator:
You process the markdown on your lokal machine and generate static html files, which are uploaded and served by a web server.
To answer your question whether or how you can use vuepress:
There are multiple possible ways, depending on your current setup.
If you only have some webspace, than you have to upload prerendered html files (or using another framework).
If you have a virtual server, than you can automate the build/rending process by using scripts, e. g. with file watchers.
Note to GitHub:
Even if you said, that you don't want to use GH... If you only want to hide the markdown files, you can create a private repository and use GH Actions as CI/CD pipeline.
Unfortunately Stackoverflow is not for software recommendation, so for alternatives to vuepress have a lookt at Software Recommendations.
I was wondering if there are modules, or code snippets to create a program that connects to the Microsoft store, in the background, and download an app(without pyAutoGUI). Thanks in advance.
There are no Official API's for accessing Microsoft store, A Possible solution is to use requests library or other equivalent to create a bot that can access various fields available on the website and navigate through, if you always want a certain(Same) application to be downloaded may be you can go directly to that links page and use get request for the download button as submit, this should work in theory, but again this will also keep breaking in short durations as Microsoft keeps making changes to it's website.
P.S. You might want to fool the website by adding headers to your request.
Wanted to generate a PDF from a URL
(https://10.1.40.117/print/e71b7c0f-4ed1-4d0d-b868-87418d398a4a).
Please help me with the links which is used to do this using nodeJS
I use Puppeteer to generate PDFs and their documentation has many examples. Since it uses Chrom(e|ium), it closes match my development environment as well which is nice when building the web pages.
For those who might stumble on this question nowadays:
There is cool tool called Gotenberg — Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF. It supports converting URLs via Google Chrome headless.
And I am happen to be an author of JS/TS client for Gotenberg — gotenberg-js-client
I welcome you to use it :)
UPD:
Gotenberg has new website now — https://gotenberg.dev
I would like to deploy an instance of TerriaJS on my site for the purpose of 3D (with 2D-fallback) geospatial mapping. I am a bit confused as to how to actually "deploy" TerriaJS on my site. I am very familiar with Leaflet... pretty much just include the leaflet.js file, create a div, and off you go. However, I am running through the wiki on TerriaJS's github page and all I see is a bunch of NodeJS.
What am I missing? I am able to get the map to run with NPM and I see a nice 3D map (running inside of a node web server instance), but that doesn't do me any good as I want to be able to embed the map on my web site.
If anyone has a nice (plain English) tutorial or starting point, that would be awesome.
Thanks.
The Node-based web server that we usually use with TerriaJS only does a few things:
It serves up the static HTML, JavaScript, and CSS that make up the application.
It includes a simple service at /proxy that allows TerriaJS to access geospatial data servers that don't support CORS.
It includes another service at /convert that uses OGR to transform geospatial vector data (e.g. shapefiles) to GeoJSON for display by the TerriaJS client.
Of these, only the first is required. So, you can copy the wwwroot directory of a working TerriaJS application up to whatever web server runs your site and it will run there just as well as it does on the Node-based server. You'll have to make sure that all of your geospatial data is either on the same server or is hosted on servers that support CORS, and shapefile conversion won't be supported, but other than that you should be good to go.
Embedding TerriaJS in an existing web page is a bit trickier. You'll want to start with the index.js, index.html, and index.less files in the TerriaJS app you started with (NationalMap maybe?) and modify them to suite your needs. You'll need to use the gulp-based build process. But once that is all done, you can just copy the files up to your web server as before.
Depending on your needs, you may also consider embedding TerriaJS on your page in an iframe rather than building it into the page directly. You can control the content of the catalog and customize some basic aspects of the UI by specifying parameters to the URL. You can also control it by posting cross-window messages as described here.
Finally, it's possible to use TerriaJS without the provided user interface, e.g. by providing your own. This is a pretty advanced scenario, though, so probably best to post a separate question if you want to go down that road.
I'm developing a web project using Node.js where users can set their profile image by uploading it to the server.
I need to perform basic manipulation on those images (resize and crop), and then store them into a blob.
I usually use GraphicsMagic or ImageMagick to achieve this kind of tasks, but I want to publish this project on Microsoft Azure website.
Is there a known and safe way to manipulate images serverside into an Azure website using Node.js?
You can use node modules with Azure Websites. However you cannot install any third party apps on the Web Sites (thus no ImageMagick or Graphics Magic).
Looking out in the wild, you may find some native node modules that does not require external components to manipulate images like the lwip and probably some more. Just find your module that is not dependent on external third party libraries and is fully self contained.
I made imagemagick work on azure websites by using site extension.
You can check the repository for more info:
https://github.com/fatihturgut/azure-imagemagick-nodejs