mirror of
https://github.com/olehomelchenko/olehomelchenko.com.git
synced 2026-02-05 02:54:37 +00:00
feat: set up migration to quarto
This commit is contained in:
2
posts/_metadata.yml
Normal file
2
posts/_metadata.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
# Shared metadata for all posts
|
||||
freeze: auto
|
||||
16
posts/index.qmd
Normal file
16
posts/index.qmd
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "Posts"
|
||||
page-layout: full
|
||||
listing:
|
||||
contents: "*.qmd"
|
||||
type: default
|
||||
sort: "date desc"
|
||||
categories: true
|
||||
sort-ui: true
|
||||
filter-ui: true
|
||||
fields: [date, title, reading-time, categories]
|
||||
date-format: "D MMMM YYYY"
|
||||
page-size: 10
|
||||
---
|
||||
|
||||
All blog posts covering data visualization, analysis, and related topics. Posts are available in both Ukrainian and English.
|
||||
25
posts/sample-english-post/index.qmd
Normal file
25
posts/sample-english-post/index.qmd
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "Sample English Post"
|
||||
date: "2024-02-20"
|
||||
lang: en
|
||||
categories:
|
||||
- dataviz
|
||||
- tutorial
|
||||
description: "Example structure for an English post"
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a sample English post. Replace this with your actual content from Hugo.
|
||||
|
||||
### Main Content
|
||||
|
||||
When you migrate your posts from Hugo, they will have this structure:
|
||||
|
||||
- Frontmatter with metadata (title, date, language, categories)
|
||||
- Markdown content
|
||||
- Support for Vega-Lite visualizations
|
||||
|
||||
## Conclusion
|
||||
|
||||
Replace this file with your actual Hugo posts.
|
||||
25
posts/sample-ukrainian-post/index.qmd
Normal file
25
posts/sample-ukrainian-post/index.qmd
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "Зразок Української Статті"
|
||||
date: "2024-01-15"
|
||||
lang: uk
|
||||
categories:
|
||||
- dataviz
|
||||
- example
|
||||
description: "Приклад структури для української статті"
|
||||
---
|
||||
|
||||
## Вступ
|
||||
|
||||
Це зразок статті українською мовою. Тут ви можете додати свій контент.
|
||||
|
||||
### Основний зміст
|
||||
|
||||
Коли ви перенесете свої статті з Hugo, вони матимуть таку структуру:
|
||||
|
||||
- Frontmatter з метаданими (title, date, language, categories)
|
||||
- Markdown контент
|
||||
- Підтримка Vega-Lite візуалізацій
|
||||
|
||||
## Висновки
|
||||
|
||||
Замініть цей файл своїми реальними статтями з Hugo.
|
||||
55
posts/sample-visualization-post/index.qmd
Normal file
55
posts/sample-visualization-post/index.qmd
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: "Sample Visualization Post"
|
||||
date: "2024-03-10"
|
||||
lang: en
|
||||
categories:
|
||||
- dataviz
|
||||
- showcase
|
||||
- vega-lite
|
||||
description: "Example post with Vega-Lite visualization"
|
||||
---
|
||||
|
||||
## Vega-Lite Example
|
||||
|
||||
This post demonstrates how to include Vega-Lite visualizations in Quarto. Note the `showcase` category - posts with this category will appear in your Portfolio.
|
||||
|
||||
### Simple Bar Chart
|
||||
|
||||
```{vega-lite}
|
||||
//| label: fig-simple-bar
|
||||
//| fig-cap: "A simple bar chart"
|
||||
{
|
||||
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
|
||||
"description": "A simple bar chart with embedded data.",
|
||||
"data": {
|
||||
"values": [
|
||||
{"category": "A", "value": 28},
|
||||
{"category": "B", "value": 55},
|
||||
{"category": "C", "value": 43},
|
||||
{"category": "D", "value": 91},
|
||||
{"category": "E", "value": 81}
|
||||
]
|
||||
},
|
||||
"mark": "bar",
|
||||
"encoding": {
|
||||
"x": {"field": "category", "type": "nominal", "axis": {"labelAngle": 0}},
|
||||
"y": {"field": "value", "type": "quantitative"}
|
||||
},
|
||||
"width": 400,
|
||||
"height": 300
|
||||
}
|
||||
```
|
||||
|
||||
### Migration Notes
|
||||
|
||||
When migrating from Hugo:
|
||||
|
||||
1. **Remove the Hugo shortcode**:
|
||||
- Old: `{{</* vega-lite id="chart1" */>}}...{{</* /vega-lite */>}}`
|
||||
|
||||
2. **Use Quarto code fence**:
|
||||
- New: ````{vega-lite}` with `//| label: chart-name`
|
||||
|
||||
3. **The visualization JSON stays the same** - just change the wrapper!
|
||||
|
||||
Replace this with your actual visualization posts from Hugo.
|
||||
Reference in New Issue
Block a user