-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge main to fix/types (#803)
* refactor: refine global layout system * chore: remove unknown console log from release script * release: v1.0.0-alpha.2 * docs: add Layer0 deployment notes Co-authored-by: meteorlxy <[email protected]> * docs: add cloudflare pages deploy (#797) close #369 Co-authored-by: Kia King Ishii <[email protected]> * refactor: improve site data parsing (#780) * fix: copy code in non-secure contexts (#792) Co-authored-by: Divyansh Singh <[email protected]> * fix(theme): add italic fonts (#759) (#777) fix #759 * docs: image migration guide for vuepress (#799) * refactor(types): use built-in utility type `Awaited` (#801) instead of explicitly defining it. (introduced in TS 4.5) * feat(theme): support themeable images for logo and hero (#745) Co-authored-by: Divyansh Singh <[email protected]> Co-authored-by: Kia King Ishii <[email protected]> Co-authored-by: Rishi Raj Jain <[email protected]> Co-authored-by: meteorlxy <[email protected]> Co-authored-by: Percy Ma <[email protected]> Co-authored-by: Linmj <[email protected]> Co-authored-by: JD Solanki <[email protected]> Co-authored-by: CHOYSEN <[email protected]> Co-authored-by: Anthony Fu <[email protected]>
- Loading branch information
1 parent
a6860a7
commit e9fec41
Showing
42 changed files
with
514 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
# Migration from VuePress | ||
|
||
Coming soon... | ||
## Markdown | ||
|
||
### Images | ||
|
||
Unlike VuePress, VitePress handles [`base`](/guide/asset-handling.html#base-url) of your config automatically when you use static image. | ||
|
||
Hence, now you can render images without `img` tag. | ||
|
||
```diff | ||
- <img :src="$withBase('/foo.png')" alt="foo"> | ||
+ ![foo](/foo.png) | ||
``` | ||
|
||
::: warning | ||
For dynamic images you still need `withBase` as shown in [Base URL guide](/guide/asset-handling.html#base-url). | ||
::: | ||
|
||
Use `<img.*withBase\('(.*)'\).*alt="([^"]*)".*>` regex to find and replace it with `![$2]($1)` to replace all the images with `![](...)` syntax. | ||
|
||
--- | ||
|
||
more to follow... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "vitepress", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"description": "Vite & Vue powered static site generator", | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
import VPFeature from './VPFeature.vue' | ||
export interface Feature { | ||
icon?: string | ||
title: string | ||
details: string | ||
} | ||
const props = defineProps<{ | ||
features: Feature[] | ||
}>() | ||
const grid = computed(() => { | ||
const length = props.features.length | ||
if (!length) { | ||
return | ||
} else if (length === 2) { | ||
return 'grid-2' | ||
} else if (length === 3) { | ||
return 'grid-3' | ||
} else if (length % 3 === 0) { | ||
return 'grid-6' | ||
} else if (length % 2 === 0) { | ||
return 'grid-4' | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div v-if="features" class="VPFeatures"> | ||
<div class="container"> | ||
<div class="items"> | ||
<div v-for="feature in features" :key="feature.title" class="item" :class="[grid]"> | ||
<VPFeature | ||
:icon="feature.icon" | ||
:title="feature.title" | ||
:details="feature.details" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.VPFeatures { | ||
position: relative; | ||
padding: 0 24px; | ||
} | ||
@media (min-width: 640px) { | ||
.VPFeatures { | ||
padding: 0 48px; | ||
} | ||
} | ||
@media (min-width: 960px) { | ||
.VPFeatures { | ||
padding: 0 64px; | ||
} | ||
} | ||
.container { | ||
margin: 0 auto; | ||
max-width: 1152px; | ||
} | ||
.items { | ||
display: flex; | ||
flex-wrap: wrap; | ||
margin: -8px; | ||
} | ||
.item { | ||
padding: 8px; | ||
width: 100%; | ||
} | ||
@media (min-width: 640px) { | ||
.item.grid-2, | ||
.item.grid-4, | ||
.item.grid-6 { | ||
width: calc(100% / 2); | ||
} | ||
} | ||
@media (min-width: 768px) { | ||
.item.grid-2, | ||
.item.grid-4 { | ||
width: calc(100% / 2); | ||
} | ||
.item.grid-3, | ||
.item.grid-6 { | ||
width: calc(100% / 3); | ||
} | ||
} | ||
@media (min-width: 960px) { | ||
.item.grid-4 { | ||
width: calc(100% / 4); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.