blank

mrfdn.com – Kali ini saya ingin mencatat bagaimana cera menampilkan data secara loop dengan menggunakan Svelte component yang berjalan di atas projekan Astro JS.

  1. Pastikan sudah add Svelte ke Astro
npx astro add svelte
  1. Setelah itu buka file ./package.json lalu pastikan svelte sudah terinstall.

  2. Jika perlu hapus file ./package-lock.json lalu install dengan perintah npm install.

  3. Sekarang buat component yang berisi list data di /src/components/Listdata.svelte, lalu isi dengan codingan ini:

<script> let items = ['halo', 'Item 2', 'Item 3', 'Item 4', 'Item 5'];</script><ul> {#each items as item} <li>{item}</li> {/each}</ul>
  1. Sekarang panggil components tersebut pada file mana saja yang diinginkan. Di sini saya membuat file baru bernama /src/pages/loop.svelte lalu isi dengan kodingan ini:
---import Gallery from '../components/ListData.svelte';---<h1>List data</h1><Gallery />
  1. Jalankan server npm run dev dan anda akan melihat hasilnya di layar.

Demikian cara menampilkan data array pada Svelte yang berjalan di atas Astro JS.

Disini kita sekalian belajar bagaimana cara setup / menambahkan Svelte pada Astro JS untuk membuat komponen tertentu.

Semoga bermanfaat.

PakarPBN

A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.

In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.

The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.

Jasa Backlink

Download Anime Batch

Leave a Reply

Your email address will not be published. Required fields are marked *

TOP