move non pages out of pages dir
This commit is contained in:
parent
46a859736a
commit
9a0459fdd3
7 changed files with 17 additions and 22 deletions
10
website/src/my_patterns.js
Normal file
10
website/src/my_patterns.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { getMetadata } from './metadata_parser';
|
||||
|
||||
export function getMyPatterns() {
|
||||
const my = import.meta.glob('../../my-patterns/**', { as: 'raw', eager: true });
|
||||
return Object.fromEntries(
|
||||
Object.entries(my)
|
||||
.filter(([name]) => name.endsWith('.txt'))
|
||||
.map(([name, raw]) => [getMetadata(raw)['title'] || name.split('/').slice(-1), raw]),
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue