summaryrefslogtreecommitdiff
path: root/docs/src/components/Examples/Functions/get-examples-headers.js
diff options
context:
space:
mode:
authorGravatar aFuzzyBear <drgaud@hotmail.com> 2021-08-10 01:24:25 +0100
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-09-06 01:21:39 -0700
commitd321d8366b597e46ff8e3fc63d17622a9297505c (patch)
tree339775403be469fdc9c53c4f9484c8ba7c23811a /docs/src/components/Examples/Functions/get-examples-headers.js
parente686c3c50469d18db93da7ce79ddcac8659c3166 (diff)
downloadastro-d321d8366b597e46ff8e3fc63d17622a9297505c.tar.gz
astro-d321d8366b597e46ff8e3fc63d17622a9297505c.tar.zst
astro-d321d8366b597e46ff8e3fc63d17622a9297505c.zip
Adds examples page
Diffstat (limited to 'docs/src/components/Examples/Functions/get-examples-headers.js')
-rw-r--r--docs/src/components/Examples/Functions/get-examples-headers.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/src/components/Examples/Functions/get-examples-headers.js b/docs/src/components/Examples/Functions/get-examples-headers.js
new file mode 100644
index 000000000..9b75d2e5d
--- /dev/null
+++ b/docs/src/components/Examples/Functions/get-examples-headers.js
@@ -0,0 +1,27 @@
+// import {templatesList as data} from './templatesList.ts'
+import templateData from './get-examples-data.js'
+const data = await templateData()
+console.log(data)
+
+// const examplesHeaders = data.map(section=>{
+// let arr = []
+// let obj = {
+// depth:2,
+// slug:section.title,
+// text:section.title,
+// }
+// arr.push(obj)
+
+// section.children.map(example=>{
+// let obj={
+// depth:3,
+// slug:example.text,
+// text:example.text,
+// }
+// arr.push(obj)
+// })
+// return [...arr]
+// }).flat(2)
+
+
+// export default examplesHeaders \ No newline at end of file