Skip to content

Commit

Permalink
fixes: documentation for deploying to Netlify thtauhid#62
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteltd committed Oct 3, 2023
1 parent e42c701 commit 507e557
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Local Netlify folder
.netlify
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

A portfolio site template that looks and feels like a terminal.

Production: https://my-terminal-portfolio.vercel.app/
Production: <https://my-terminal-portfolio.vercel.app/>

## Installation

Expand Down Expand Up @@ -89,6 +89,34 @@ vercel

7. Once the deployment is complete, your terminal-portfolio will be live on Vercel, and Vercel Analytics will be enabled by default, providing you with valuable insights into your website's performance.

## Deploying to Netlify

Deploying to Netlify can also be a great idea. Considering the fact that they are a large web hosting server as compared to vercel. For deploying to Netlify, we can use two main approaches and we will discuss them in detail.

### Deploying to Netlify through the CLI

1. Bear in my mind that this project is using Vite framework. To make sure you are using the latest Netlify CLI, run the following command in the project terminal:
`bash npm install netlify-cli -g`

2. Next, in the directory of your project, run the following command to create a new file on Netlify:
`bash netlify init`

3. In case you are new to Netlify, you will be redirected to create a profile on the platform or you can use your github profile to connect to the platform.

4. Once netlify is initialized, follow the prompts carefully, select the team option if necessary and then optionally personalize the site name if any.

5. Go back to the netlify platform on the browser and reload the page.

### Optionally deploying to Netlify through GitHub

1. Upload your project source code to your github profile.

2. Go to [netlify](netlify.com) and sign up to the platform using your github profile.

3. On your netlify page, go to add new site option and select the import an existing project.

4. Follow the prompts and your project is hosted by netlify. Optionally, you can customize the site if you want.

## Contributing

[Contributing Guide](CONTRIBUTING.md)
Expand Down
21 changes: 21 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# example netlify.toml
[build]
command = "vite build"
functions = "netlify/functions"
publish = "dist"

## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
#[[redirects]]
# from = "/*"
# to = "/index.html"
# status = 200

## (optional) Settings for Netlify Dev
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
#[dev]
# command = "yarn start" # Command to start your dev server
# port = 3000 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file

## more info on configuring this file: https://docs.netlify.com/configure-builds/file-based-configuration/

0 comments on commit 507e557

Please sign in to comment.