Skip to content

Commit ee364a8

Browse files
cahyonobagusmazipan
authored andcommitted
[vuejs#149] [Cookbook] translate cookbook - serverless blog (vuejs#179)
1 parent 3417944 commit ee364a8

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

src/v2/cookbook/serverless-blog.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
---
2-
title: Create a CMS-Powered Blog
2+
title: Membuat Blog Bertenaga CMS
33
type: cookbook
44
order: 5
55
---
66

7-
So you've just launched your Vue.js website, congrats! Now you want to add a blog that quickly plugs into your website and you don't want to have to spin up a whole server just to host a Wordpress instance (or any DB-powered CMS for that matter). You want to just be able to add a few Vue.js blog components and some routes and have it all just work, right? What you're looking for is a blog that's powered entirely by API's you can consume directly from your Vue.js application. This tutorial will teach you how to do just that, let's dive in!
7+
Jadi Anda baru saja meluncurkan website Vue.js Anda, selamat! Sekarang Anda ingin menambahkan sebuah blog yang cepat terhubung ke dalam website Anda dan Anda tidak ingin harus merubah seluruh server hanya untuk menjadi *host* Wordpress *instance* (atau CMS dilengkapi DB untuk hal ini). Anda hanya ingin bisa menambahkan beberapa komponen blog Vue.js dan beberapa rute dan membuatnya berfungsi, bukan? Apa yang Anda cari adalah blog yang sepenuhnya di didukung oleh API yang dapat Anda konsumsi secara langsung dari aplikasi Vue.js Anda. Tutorial ini akan mengajarkan Anda bagaimana melakukannya. Mari menyelaminya.
88

9-
We're going to quickly build a CMS-powered blog with Vue.js. It uses [ButterCMS](https://buttercms.com/), an API-first CMS that lets you manage content using the ButterCMS dashboard and integrate our content API into your Vue.js app. You can use ButterCMS for new or existing Vue.js projects.
9+
Kita akan membangun dengan cepat sebuah blog bertenaga CMS dengan Vue.js. Ini menggunakan [ButterCMS](https://buttercms.com/), sebuah CMS yang mengutamakan API, yang mengijinkan Anda mengelola konten menggunakan ButterCMS dasbor dan mengintegrasikan API konten ke dalam aplikasi Vue.js Anda. Anda dapat menggunakan ButterCMS untuk proyek Vue.js baru maupun yang sudah ada.
1010

1111
![Butter Dashboard](https://user-images.githubusercontent.com/160873/36677285-648798e4-1ad3-11e8-9454-d22fca8280b7.png "Butter Dashboard")
1212

13-
## Install
13+
## Memasang
1414

15-
Run this in your commandline:
15+
Jalankan perintah berikut pada *commandline*:
1616

1717
```bash
1818
npm install buttercms --save
1919
```
2020

21-
Butter can also be loaded using a CDN:
21+
Butter juga dapat di muat menggunakan CDN:
2222

2323
```html
2424
<script src="https://cdnjs.buttercms.com/buttercms-1.1.0.min.js"></script>
2525
```
2626

27-
## Quickstart
27+
## Memulai Cepat
2828

29-
Set your API token:
29+
Atur token API Anda:
3030

3131
```javascript
3232
var butter = require('buttercms')('your_api_token');
3333
```
3434

35-
Using ES6:
35+
Menggunakan ES6:
3636

3737
```javascript
3838
import Butter from 'buttercms';
3939
const butter = Butter('your_api_token');
4040
```
4141

42-
Using CDN:
42+
Menggunakan CDN:
4343

4444
```html
4545
<script src="https://cdnjs.buttercms.com/buttercms-1.1.0.min.js"></script>
@@ -48,21 +48,21 @@ Using CDN:
4848
</script>
4949
```
5050

51-
Import this file into any component you want to use ButterCMS. Then from the console run:
51+
Impor file ini ke dalam komponen dimana Anda ingin menggunakan ButterCMS. Kemudian dari konsol jalankan:
5252

5353
```javascript
5454
butter.post.list({page: 1, page_size: 10}).then(function(response) {
5555
console.log(response)
5656
})
5757
```
5858

59-
This API request fetches your blog posts. Your account comes with one example post which you'll see in the response.
59+
Permintaan API ini mengambil pos blog Anda. Akun Anda dilengkapi dengan sebuah contoh pos yang akan Anda lihat di dalam respon.
6060

61-
## Display posts
61+
## Menampilkan pos
6262

63-
To display posts we create a `/blog` route (using Vue Router) in our app and fetch blog posts from the Butter API, as well as a `/blog/:slug` route to handle individual posts.
63+
Untuk menampilkan pos-pos, kita buat sebuah rute `/blog` (menggunakan Vue Router) di dalam aplikasi kita dan mengambil pos blog dari API Butter, serta rute `/blog/:slug` untuk menangani masing-masing pos.
6464

65-
See the ButterCMS [API reference](https://buttercms.com/docs/api/?javascript#blog-posts) for additional options such as filtering by category or author. The response also includes some metadata we'll use for pagination.
65+
Lihat [Referensi API](https://buttercms.com/docs/api/?javascript#blog-posts) ButterCMS untuk opsi tambahan seperti filter berdasar kategori atau penulis. Respon juga termasuk beberapa *metadata* yang akan kita gunakan untuk *pagination*.
6666

6767
`router/index.js:`
6868

@@ -91,7 +91,7 @@ export default new Router({
9191
})
9292
```
9393

94-
Then create `components/BlogHome.vue` which will be your blog homepage that lists your most recent posts.
94+
Kemudian buat `components/BlogHome.vue` yang akan menjadi halaman utama blog Anda yang menampilkan daftar pos Anda paling baru.
9595

9696
```html
9797
<script>
@@ -153,11 +153,11 @@ Then create `components/BlogHome.vue` which will be your blog homepage that list
153153
</template>
154154
```
155155

156-
Here's what it looks like (note we added CSS from https://bulma.io/ for quick styling):
156+
Berikut tampilannya (perhatikan bahwa kita menambahkan CSS dari https://bulma.io/ untuk penataan secara cepat)
157157

158158
![buttercms-bloglist](https://user-images.githubusercontent.com/160873/36868500-1b22e374-1d5e-11e8-82a0-20c8dc312716.png)
159159

160-
Now create `components/BlogPost.vue` which will be your Blog Post page to list a single post.
160+
Sekarang buat `components/BlogPost.vue` yang akan menjadi halaman pos blog untuk menampilkan sebuah pos.
161161

162162
```html
163163
<script>
@@ -209,19 +209,19 @@ Now create `components/BlogPost.vue` which will be your Blog Post page to list a
209209
</template>
210210
```
211211

212-
Here's a preview:
212+
Berikut pratinjaunya:
213213

214214
![buttercms-blogdetail](https://user-images.githubusercontent.com/160873/36868506-218c86b6-1d5e-11e8-8691-0409d91366d6.png)
215215

216-
Now our app is pulling all blog posts and we can navigate to individual posts. However, our next/previous post buttons are not working.
216+
Sekarang aplikasi kita menarik semua pos blog dan kita dapat menavigasi ke masing-masing pos. Namun, tombol pos berikutnya/ pos sebelumnya tidak berfungsi
217217

218-
One thing to note when using routes with params is that when the user navigates from `/blog/foo` to `/blog/bar`, the same component instance will be reused. Since both routes render the same component, this is more efficient than destroying the old instance and then creating a new one.
218+
Satu hal yang perlu diperhatikan ketika menggunakan rute dengan parameter adalah ketika pengguna menavigasi dari `/blog/foo` ke `/blog/bar`, komponen yang sama akan digunakan kembali. Karena kedua rute me-*render* komponen yang sama, ini lebih efisien daripada menghancurkan *instance* lama kemudian membuat yang baru.
219219

220-
<p class="tip">Be aware, that using the component this way will mean that the lifecycle hooks of the component will not be called. Visit the Vue Router's docs to learn more about [Dynamic Route Matching](https://router.vuejs.org/en/essentials/dynamic-matching.html)</p>
220+
<p class="tip">Perlu dipahami, bahwa menggunakan komponen dengan cara ini berarti bahwa kait siklus hidup komponen tidak akan dipanggil. Kunjungi dokumen Vue Router untuk mempelajari lebih lanjut tentang [Pencocokan Rute Dinamis] (https://router.vuejs.org/en/essentials/dynamic-matching.html)</p>
221221

222-
To fix this we need to watch the `$route` object and call `getPost()` when the route changes.
222+
Untuk memperbaiki ini kita perlu memantau objek `$route` dan memanggil `getPost()` ketika rute berubah.
223223

224-
Updated `<script>` section in `components/BlogPost.vue`:
224+
Bagian `<script>` yang sudah diperbarui di `components/BlogPost.vue`:
225225

226226
```html
227227
<script>
@@ -255,19 +255,19 @@ Updated `<script>` section in `components/BlogPost.vue`:
255255
</script>
256256
```
257257

258-
Now your app has a working blog that can be updated easily in the ButterCMS dashboard.
258+
Sekarang aplikasi Anda memiliki blog yang berfungsi yang dapat diperbarui dengan mudah di dasbor ButterCMS.
259259

260-
## Categories, Tags, and Authors
260+
## Kategori, Tag, dan Penulis
261261

262-
Use Butter's APIs for categories, tags, and authors to feature and filter content on your blog.
262+
Gunakan API Butter untuk kategori, tag dan penulis untuk menampilkan dan memfilter konten di blog Anda.
263263

264-
See the ButterCMS API reference for more information about these objects:
264+
Lihat Referensi API ButterCMS untuk info lebih lanjut tentang objek ini:
265265

266-
* [Categories](https://buttercms.com/docs/api/?ruby#categories)
267-
* [Tags](https://buttercms.com/docs/api/?ruby#tags)
268-
* [Authors](https://buttercms.com/docs/api/?ruby#authors)
266+
* [Kategori](https://buttercms.com/docs/api/?ruby#categories)
267+
* [Tag](https://buttercms.com/docs/api/?ruby#tags)
268+
* [Penulis](https://buttercms.com/docs/api/?ruby#authors)
269269

270-
Here's an example of listing all categories and getting posts by category. Call these methods on the `created()` lifecycle hook:
270+
Berikut adalah contoh menampilkan daftar semua kategori dan mendapatkan pos berdasar kategori. Panggil method pada kait siklus hidup `created()`:
271271

272272
```javascript
273273
methods: {
@@ -296,10 +296,10 @@ created() {
296296
}
297297
```
298298

299-
## Alternative Patterns
299+
## Pola Alternatif
300300

301-
An alternative pattern to consider, especially if you prefer writing only in Markdown, is using something like [Nuxtent](https://nuxtent-module.netlify.com/guide/writing/#async-components). Nuxtent allows you to use `Vue Component` inside of Markdown files. This approach would be akin to a static site approach (i.e. Jekyll) where you compose your blog posts in Markdown files. Nuxtent adds a nice integration between Vue.js and Markdown allowing you to live in a 100% Vue.js world.
301+
Pola alternatif untuk dipertimbangkan, terutama jika Anda lebih suka menulis dengan Markdown, adalah dengan menggunakan sesuatu seperti [Nuxtent](https://nuxtent-module.netlify.com/guide/writing/#async-components). Nuxtent memungkinkan Anda menggunakan `Vue Component` di dalam file Markdown. Pendekatan ini akan mirip dengan pendekatan situs statis (contoh Jekyll) di mana Anda menulis pos blog Anda di dalam file Markdown, Nuxtent menambahkan integrasi yang bagus antara Vue.js dan Markdown memungkinkan Anda untuk hidup di dunia 100% Vue.js.
302302

303-
## Wrap up
303+
## Ringkasan
304304

305-
That's it! You now have a fully functional CMS-powered blog running in your app. We hope this tutorial was helpful and made your development experience with Vue.js even more enjoyable :)
305+
Itulah tutorialnya! Anda sekarang memiliki blog bertenaga CMS yang berfungsi penuh yang berjalan di aplikasi Anda. Kami berharap tutorial ini bermanfaat dan menjadikan pengalaman pengembangan Anda dengan Vue.js semakin menyenangkan :)

0 commit comments

Comments
 (0)