Picture generated with this application.
Deploy your own copy of this project on Vercel in just a few clicks:
See the Deployment
section for more information.
Clone the repository and install the dependencies:
git clone https://github.com/jsulpis/website-screenshot.git && cd website-screenshot && yarn
The API url is made from the base url of the application, which is either defined in the environment variable BASE_URL
, or window.location
if the variable is not defined. For local development, I use the API already deployed on my dev environment, so I have BASE_URL=https://website-screenshot.juliensulpis.now.sh
in a .env
file in the src
folder. You can (and are encouraged to!) deploy your own copy of the project and use your API instead.
Serve with hot reload at localhost:3000.
yarn dev
If you want a JAMstack website: generate a fully static project with pre-rendered pages to put directly on a server or any hosting platform.
yarn generate
If you want to serve your website with SSR:
yarn build
yarn start
This template is ready to be deployed on Vercel:
Here are the settings to use:
- Build Command:
yarn generate
- Output Directory:
src/dist
Keep the other default values.
The environment variable BASE_URL
is also used for the website url in the meta tags. If you deploy it and would like to have proper meta tags, you may want to set this environment variable on your platform.
Released under the MIT license.