mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-12 23:05:12 +00:00
17 lines
532 B
Python
17 lines
532 B
Python
import os
|
|
|
|
def get_struct():
|
|
yield ('', None)
|
|
yield ('community/', None)
|
|
yield ('support/versioning/', None)
|
|
|
|
# Enumerate all the templates that will generate pages
|
|
pages_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../templates/pages/'))
|
|
for root, dirs, files in os.walk(pages_dir):
|
|
# Cut out the reference to the absolute root path
|
|
r = '' if root == pages_dir else os.path.relpath(root, pages_dir)
|
|
for f in files:
|
|
if f.endswith('.html'):
|
|
yield (os.path.join(r, f)[:-5] + "/",
|
|
None)
|