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
.hoverable-shadow { | |
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, | |
rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.1) 0px 2px 4px -2px; | |
transition-duration: 0.5s; | |
transition-property: color, background-color, border-color, | |
text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, | |
backdrop-filter, -webkit-backdrop-filter; | |
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); | |
&:hover { |
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
export function getDocBySlug(dir, slug, fields = []) { | |
const realSlug = slug.replace(/\.md$/, ''); | |
const fullPath = join('/base/', `${realSlug}.md`); | |
const fileContents = fs.readFileSync(fullPath, 'utf8'); | |
const { data, content } = matter(fileContents); | |
console.log(data, content); | |
const items = {}; | |
// Ensure only the minimal needed data is exposed | |
fields.forEach((field) => { |