Slidev, a presentation tool for developers

Slidev, a presentation tool for developers

2022-11-10 0 829
Resource Number 47863 Last Updated 2025-02-21
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue features Slidev, a presentation tool for developers.

Slidev, a presentation tool for developers插图

Slidev is a web-based slide-making and presentation tool. It’s designed to allow developers to focus on writing content in Markdown, with the ability to support HTML and Vue components, pixel-perfect layouts, and interactive demo samples built into your pitch. Slidev uses feature-rich markdown files to generate beautiful slides with an instant reload experience. At the same time, it also has many built-in integration functions, such as real-time coding, PDF export, speech recording and so on.

Features

    • Markdown support — Write Markdown files using your favorite editor and workflow
    • Developer friendly — built-in code highlighting, real-time coding and other functions
    • Customizable themes — Share and use themes

as npm packages

    • Flexible style — Utility classes and easy-to-use inline style sheets for on-demand use with Windi CSS
    • Interoperable — seamlessly embedded Vue components
    • Speaker mode — you can use another window or even your phone to control the slide
    • Drawing — Drawing and annotating on your slide
    • LaTeX support — built-in support for LaTeX mathematical formulas
    • Chart support — Create charts using text description language
    • icon — Can get icon

directly from any icon library

    • Editor — integrated editor, or extend

with VS Code

  • Speech recording — built-in recording and camera view
  • Cross-platform — able to export PDF, PNG files, or even a single page application that can be hosted
  • Fast — Instant reload based on Vite
  • Configurable — Support for Vite plug-ins, Vue components, and any npm package

Technical stack

  • Vite — a very fast front-end tool
  • Vue 3-based Markdown — ability to focus on HTML and Vue components while focusing on content
  • Windi CSS — on-demand, utility class first CSS framework, easily customize your slide style
  • Prism, Shiki, Monaco Editor — First-class snippeting support with real-time coding capabilities
  • RecordRTC — built-in recording and camera view
  • VueUse family — vueuse/core, vueuse/head, vueuse/motion, etc.
  • Iconify — Icon library collection
  • Drauu — Support for drawings and comments
  • KaTeX — LaTeX mathematical rendering
  • Mermaid — text description language create chart

Local installation

Use NPM:

$ npm init slidev

Use Yarn:

$ yarn create slidev

Start build command:

{
"scripts": {
"dev":  "slidev", // Start dev server
"build":  "slidev build", // Build single-page applications in production 
"export":  "slidev export" // Export the slides to pdf 
}
}

Access:

 http://localhost:3030/

Example

slides are written from a markdown file (the default is./slides.md).

You can use markdown’s features as you would normally write Markdown, while also supporting inline HTML and Vue components. Writing styles using Windi CSS is also supported. Use — to add separators to separate your slides.

# Slidev

Hello, World!

---

# Page 2

Directly use code blocks for highlighting

```ts
console.log('Hello, World!')
```

---

# Page 3

You can directly use Windi CSS and Vue components to style and enrich your slides.

<div class="p-3">
  <Tweet id="20" />
</div>

Title page and layout

You can specify a layout and other metadata for each slide by converting the separator to a front matter. Each title page message begins with the separator — and ends with another separator –. The text between the two delimiters is a YAML formatted data object. The following is an example:

---
layout: cover
---

# Slidev

This is the cover page.

---
layout: center
background: './images/background-1.png'
class: 'text-white'
---

# Page 2

This is a page with the layout `center` and a background image.

---

# Page 3

This is a default page without any additional metadata.

Code block

A very important reason to build Slidev is to have the code correctly highlighted in the slide. As you can see, you can use Markdown style code blocks to make your code highlighted.

```ts
console.log('Hello, World! ')
```

Highlight specific lines

If you want to highlight a particular line, simply add the corresponding line number inside {}. The line number starts from 1.

```ts {2,3}

function add(

a: Ref< number>  | number,

b: Ref< number>  | number

) {

return computed(() =>  unref(a) + unref(b))

}

```

If you want to change the highlighting in multiple steps, you can separate them with |. For example:

```ts {2-3|5|all}

function add(

a: Ref< number>  | number,

b: Ref< number>  | number

) {

return computed(() =>  unref(a) + unref(b))

}

```

This code starts with a: Ref< number> | number and b: Ref< number> | number is highlighted, and when you click on the slide, it’s highlighted. return computed(() => unref(a) + unref(b)), and finally, the entire block is highlighted. You can learn more in the Animation Guide.

—END—

Open Source protocol: MIT

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code Slidev, a presentation tool for developers https://ictcoder.com/slidev-a-presentation-tool-for-developers/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services