security/codeql-dependabot-gitleaks
| 1 | import { getFrontMatter } from "./get-front-matter.js" |
| 2 | |
| 3 | export async function getFileSlug( |
| 4 | filePath: string |
| 5 | ): Promise<string | undefined> { |
| 6 | const fileFrontmatter = await getFrontMatter(filePath) |
| 7 | |
| 8 | if (fileFrontmatter.slug) { |
| 9 | // add to slugs array |
| 10 | return fileFrontmatter.slug |
| 11 | } |
| 12 | } |