A blazing fast ⚡ blog built with Vue.js (frontend) and Rocket.rs (backend).
- Rust with nightly toolchain.
- Node.js (recommend version >= 12.x.x)
- Frontend:
cd client
npm run install
- Backend:
cd ..
cargo build
If you want to customize your site or add new features use both commands (on separated terminals):
cd client
npm run dev
cd ..
cargo run
And then you can start adding new stuff or editing what already exists!
Running on production mode lets you generate the client files and run the client and server only using Rocket.rs.
cd client
npm run generate
cd ..
cargo run
- On the files:
pages/index.vue
pages/post/_slug.vue
You can see that it has the string http://localhost:8000/
it is the server address to search for the post images.
- On the file
nuxt.config.js
, you can see:
proxy: {
'/api/': {
target: 'http://localhost:8000/api/',
pathRewrite: {
'^/api/': ''
},
changeOrigin: true
}
}
You will need to the same as for the above, change the server adress to the correct adress based on the rust server.
- All posts are based on the file system and you can create a new post just adding a new folder on
blog/posts
with the title of the blog post, like:my-post-title
. Note that the-
will be replaced as a space on the site. - Add the file
content.md
with the post content. - You can add an image to the post inserting a file named
image.jpg
.
- The process os creating new pages is more simple, all you need to do is create a new markdown file in
blog/pages
, likeabout.md
and insert the content of the page on the file.