From b394f44ad3f85b8b8c5e38a79269f7e572883408 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Fri, 18 Feb 2022 23:37:57 -0500 Subject: [PATCH 1/9] removes skeleton files --- components/NuxtLogo.vue | 19 ------- components/Tutorial.vue | 122 ---------------------------------------- 2 files changed, 141 deletions(-) delete mode 100644 components/NuxtLogo.vue delete mode 100644 components/Tutorial.vue diff --git a/components/NuxtLogo.vue b/components/NuxtLogo.vue deleted file mode 100644 index f038904..0000000 --- a/components/NuxtLogo.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/components/Tutorial.vue b/components/Tutorial.vue deleted file mode 100644 index c0377a8..0000000 --- a/components/Tutorial.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - From 131835a28ae8c40c2424b0ecce58cf61054b7758 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Sat, 19 Feb 2022 17:56:34 -0500 Subject: [PATCH 2/9] adds netlify.toml build setup --- netlify.toml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/netlify.toml b/netlify.toml index 007ab19..bfd6648 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,12 +1,17 @@ -# This is the configuration file for Netlify -# https://docs.netlify.com/configure-builds/file-based-configuration/ +## This is the configuration file for Netlify +## https://docs.netlify.com/configure-builds/file-based-configuration/ -# Learn more about redirects here -# https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file -# https://docs.netlify.com/routing/redirects/redirect-options/ +[[build]] + command = "npm run generate" # how to build your project + functions = "netlify/functions" # where Netlify Functions live + publish = "dist" # where the built project lives + +## Learn more about redirects here +## https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file +## https://docs.netlify.com/routing/redirects/redirect-options/ [[redirects]] -from = "/api/*" # simplify all calls to serverless functions -to = "/.netlify/functions/:splat" # all function calls will go to this path -status = 200 # ok code -force = true # ensure to always redirect + from = "/api/*" # simplify all calls to serverless functions + to = "/.netlify/functions/:splat" # all function calls will go to this path + status = 200 # ok code + force = true # ensure to always redirect From e4dcdea32da3e5780c65fcc2f3c1437e7e35f327 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Sat, 19 Feb 2022 18:02:25 -0500 Subject: [PATCH 3/9] adds feedback form --- components/feedbackForm.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 components/feedbackForm.vue diff --git a/components/feedbackForm.vue b/components/feedbackForm.vue new file mode 100644 index 0000000..f3aa6cc --- /dev/null +++ b/components/feedbackForm.vue @@ -0,0 +1,15 @@ + \ No newline at end of file From f5903243154e04f1cd59801d3b0198db43bbb911 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Mon, 21 Feb 2022 11:43:00 -0500 Subject: [PATCH 4/9] edits toml and runs init --- .gitignore | 3 +++ netlify.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e8f682b..e5211e1 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,6 @@ sw.* # Vim swap files *.swp + +# Local Netlify folder +.netlify diff --git a/netlify.toml b/netlify.toml index bfd6648..75e97ee 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,7 +1,7 @@ ## This is the configuration file for Netlify ## https://docs.netlify.com/configure-builds/file-based-configuration/ -[[build]] +[build] command = "npm run generate" # how to build your project functions = "netlify/functions" # where Netlify Functions live publish = "dist" # where the built project lives From 5d49a138bfcc5514cd9bee37338f6331ed3f2c11 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Mon, 21 Feb 2022 15:55:33 -0500 Subject: [PATCH 5/9] adds instructions and resources --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84599f9..3f0a4e1 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,44 @@ $ npm run start # generate static project $ npm run generate ``` -## Redirects +## Deploy to Netlify +--- +Want to deploy immediately? Click this button + +[![Deploy to Netlify Button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/nuxt-toolbox) + +To deploy using the Netlify cli: + +```bash +npm install netlify-cli -g # to install the Netlify CLI tool globally +netlify init # initialize a new Netlify project & deploy +``` + +It will use the information from the included Netlify configuration file, [`netlify.toml`](./netlify.toml), to set up the build command as `npm run generate` to create a static project and locate the build project in the `dist` directory. + +The `init` process will also set up continuous deployemnt for your project so that a new build will be triggered & deployed when you push code to the repo (you can change this from your project dashboard: Site Settings/Build & deploy/Continuous Deployment). + +You can also use `netlify deploy (--prod)` to manually deploy and `netlify open` to open your project dashboard. + +> 💡 we only have so many keystrokes to give, use `ntl` shorthand for `netlify` or make [an alias of your own](https://www.netlify.com/blog/2020/04/12/speed-up-productivity-with-terminal-aliases/) to save hours...of accumulated miliseconds + +### Running Locally + +You can use `netlify dev` from the command line to access project information like environment variables as well as +- test functions +- test redirects +- share a live session via url with `netlify dev --live` +- [and more](https://cli.netlify.com/netlify-dev/) :) + +### Deployment Resources +- [CLI docs](https://docs.netlify.com/cli/get-started/) +- [File-based Netlify Configuration](https://docs.netlify.com/configure-builds/file-based-configuration/) +- [Netlify Dev Overview](https://www.youtube.com/watch?v=RL_gtVZ_79Q&t=812s) +- [Netlify Edge, CDN deployment](https://www.netlify.com/products/edge/) + +## Redirects +--- In the [`netlify.toml`](./netlify.toml) configuration file there is an example of how to implement redirects. Redirects can be used to do many things from redirecting Single Page Apps more predictably, redirecting based on country/language to leveraging On-Demand Builders for [Distributed Persistant Rendering](https://www.netlify.com/blog/2021/04/14/distributed-persistent-rendering-a-new-jamstack-approach-for-faster-builds/). In the example we'll be using redirects to have a shorter endpoint to Netlify functions. By default, you call a Netlify function when requesting a path like `https://yoursite.netlify.com/.netlify/functions/functionName`. Instead, we'll redirect all calls from a path including `/api` to call on the Netlify functions. So the path will be `https://yoursite.netlify.com/api/functionName`, a lot easier to remember too. From 24059f8e756e0b477b5755bbb5dfdea18c3fd3fa Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Mon, 21 Feb 2022 17:26:40 -0500 Subject: [PATCH 6/9] merges deploy stuff and adds form component --- pages/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index b86323a..dbbaf3e 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,9 +1,11 @@ From bcd08b388448a999e727e8af357591c5f5e09e36 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Mon, 21 Feb 2022 22:21:19 -0500 Subject: [PATCH 7/9] adds styling and linting --- components/feedbackForm.vue | 41 ++++++++++++++++++++++++++++--------- pages/index.vue | 7 ++++++- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/components/feedbackForm.vue b/components/feedbackForm.vue index f3aa6cc..b758542 100644 --- a/components/feedbackForm.vue +++ b/components/feedbackForm.vue @@ -1,15 +1,36 @@ \ No newline at end of file + + diff --git a/pages/index.vue b/pages/index.vue index dbbaf3e..a42adf6 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -3,9 +3,14 @@ + From ead53012447009cc50519681efd6989e73527c37 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Mon, 21 Feb 2022 23:20:47 -0500 Subject: [PATCH 8/9] tries weird things --- pages/index.vue | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index a42adf6..c3dd9b5 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,14 +1,6 @@ - -