You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -68,4 +68,77 @@ All in all, these are amazing tools that let us create blazing fast sites, in a
68
68
69
69
70
70
## Getting started
71
-
TBD
71
+
For this, we'll only be needing:
72
+
- Github account
73
+
- Netlify account
74
+
- Vue/Nuxt understanding
75
+
76
+
## Fork the repo
77
+
Using your Github account, go ahead and [click here](https://github.com/israelmuca/israelmuca.dev/fork) to fork the repo or just [clone it](https://github.com/israelmuca/israelmuca.dev).
78
+
79
+
## Build Setup
80
+
Install all the dependencies
81
+
```bash
82
+
npm i
83
+
```
84
+
85
+
Now, you can run the code in development with:
86
+
```bash
87
+
npm run dev
88
+
```
89
+
This will serve your page in `localhost:3000` with hot reload.
90
+
91
+
Once you're ready to generate your static assets for production:
92
+
```bash
93
+
npm run generate
94
+
```
95
+
This will create a `/dist` folder with the assets. This folder is not committed.
96
+
This is what Netlify will be building on their server, and then uploading the results to their CDN. *We don't need to do this manually ever.* We just do it for the sake of watching what happens inside Netlify.
97
+
98
+
## Configure your *new* repo
99
+
100
+
### Netlify CMS
101
+
You'll need to define your fields and files for your content. I'm using defaults very similar to what you can see in [dev.to](https://dev.to). Mostly covering the title, description and keywords for SEO purposes, also a little summary of the post as well as a main image which is used both in the ArticleCard.vue and the Header.vue in the blog post page.
102
+
103
+
You can configure these fields in: `static/admin/config.yml`, and feel free to check the [Netlify CMS Documentation](https://www.netlifycms.org/docs/configuration-options/) for extra customization.
104
+
105
+
While your local server is running, you can access [localhost:3000/admin/](localhost:3000/admin/) to modify the content of your blog. You can also do it once it's deployed when you have the Netlify's address that's given to you.
106
+
107
+
### Routes
108
+
In here, both Nuxt and Nuxtdown work together to create the routes in the website.
109
+
110
+
In the `pages` directory, you'll find an `index.vue` which is, as the name implies, the index of our site.
111
+
**This is handled by Nuxt**.
112
+
113
+
The `pages/blog/` directory will work as a directory in our site as well (israelmuca.dev/blog/... in my case), which will hold all the blog posts that are created using the `_blogpost.vue` template inside. It will be compiled once for each `.md` in the `content/blog/` directory. You can see how the content is fetched inside of that `.vue` file.
114
+
**This is handled by Nuxtdown**.
115
+
116
+
You can configure Nuxtdown in: `nuxtdown.config.js`, and please go ahead and check the [Nuxtdown Documentation](https://github.com/joostdecock/nuxtdown-module/blob/master/README.md) to further understand what is happening or to change the functionality.
117
+
118
+
### The rest of the site
119
+
The rest of the site is a regular Vue + Nuxt app, I tried to comment the code where I think it's needed the most, and you can configure Nuxt in: `nuxt.config.js`, also, as usual, please check the [Vue.js](https://vuejs.org/v2/guide/) and [Nuxt.js](https://nuxtjs.org/guide/) documentation to further understand this code if you have any questions.
120
+
121
+
122
+
## Congratulations
123
+
By this point, you should have a fully functional Nuxt generated, Netlify hosted, blog site.
124
+
125
+
## Issues
126
+
If you have any problems implementing this, please don't hesitate and create a Github Issue or send me a [tweet](https://twitter.com/IsraelMuCa).
127
+
128
+
## Thanks
129
+
There's a phrase that I love and always try and remember:
130
+
> _If I have seen further it is by standing in the shoulders of Giants_
131
+
> - Isaac Newton
132
+
133
+
Being true to that phrase, I have to acknowledge the many people that in one way or another contributed to this specific repo:
134
+
-[Andrea Gomez - with her design](https://twitter.com/acgomezu)
0 commit comments