File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 88from pcweb .flexdown import xd2 as xd
99from pcweb .pages .gallery import gallery
1010from pcweb .templates .gallery_app_page import gallery_app_page
11+ import copy
1112
1213GALLERY_APP_SOURCES = [
1314 ("templates/" , "docs/getting-started/open-source-templates/" ),
@@ -20,9 +21,9 @@ def load_all_gallery_apps():
2021 for folder , _ in GALLERY_APP_SOURCES :
2122 paths = flexdown .utils .get_flexdown_files (folder )
2223 for path in reversed (sorted (paths )):
23- document = flexdown .parse_file (path )
24+ document = flexdown .Document . from_file (path ) # This has metadata
2425 document .metadata ["title" ] = document .metadata .get ("title" , "Untitled" ).replace ("_" , " " ).title ()
25- clean_path = path .replace (".md" , "/" )
26+ clean_path = str ( path ) .replace (".md" , "/" )
2627 gallery_apps [(clean_path , folder )] = document
2728 return gallery_apps
2829
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ def get_templatey_apps(paths):
1212 """Method to parse each markdown file and return the data from the file"""
1313 gallery_apps = {}
1414 for path in reversed (sorted (paths )):
15- document = flexdown .parse_file (path )
16- path = path .replace (".md" , "/" )
17- gallery_apps [path ] = document
15+ document = flexdown .Document . from_file (path ) # This has metadata
16+ key = str ( path ) .replace (".md" , "/" )
17+ gallery_apps [key ] = document
1818 return gallery_apps
1919
2020paths = flexdown .utils .get_flexdown_files (REFLEX_BUILD_TEMPLATES_PATH )
You can’t perform that action at this time.
0 commit comments