Skip to content

Commit

Permalink
fix: remove useless path base for web resource
Browse files Browse the repository at this point in the history
  • Loading branch information
zouhangwithsweet committed Jun 30, 2021
1 parent d971dd9 commit bf2b971
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/theme-default/components/HomeHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ const showHero = computed(() => {
})
const heroText = computed(() => frontmatter.value.heroText || site.value.title)
const isWebResource = (path: string) => /^(https{0,1}\:){0,1}\/\//.test(path)
</script>

<template>
<header v-if="showHero" class="home-hero">
<figure v-if="frontmatter.heroImage" class="figure">
<img
class="image"
:src="withBase(frontmatter.heroImage)"
:src="isWebResource(frontmatter.heroImage) ? frontmatter.heroImage : withBase(frontmatter.heroImage)"
:alt="frontmatter.heroAlt"
/>
</figure>
Expand Down

0 comments on commit bf2b971

Please sign in to comment.