diff --git a/AUTHORIZATION.md b/AUTHORIZATION.md index 7c29a1a..1cef916 100644 --- a/AUTHORIZATION.md +++ b/AUTHORIZATION.md @@ -1,6 +1,5 @@ --- title: 'Аутентификация для API сайтов СП' -layout: 'layout.11ty.js' permalink: '/authorization/' --- diff --git a/CARD.md b/CARD.md index dfd5658..0cb08ae 100644 --- a/CARD.md +++ b/CARD.md @@ -1,9 +1,3 @@ ---- -title: 'Как переводить деньги с карты при помощи API?' -layout: 'layout.11ty.js' -permalink: '/card/' ---- - # Как переводить деньги с карты при помощи API? ## Аутентификация diff --git a/PAYMENTS.md b/PAYMENTS.md index 4abd27d..3166f34 100644 --- a/PAYMENTS.md +++ b/PAYMENTS.md @@ -1,9 +1,3 @@ ---- -title: 'Как встроить оплату АРами на свой сайт / приложение?' -layout: 'layout.11ty.js' -permalink: '/payments/' ---- - # Как встроить оплату АРами на свой сайт / приложение? ## Аутентификация diff --git a/README.md b/README.md index efdf0df..59b28cd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ ---- -title: 'Вступление' -layout: 'layout.11ty.js' -permalink: '/' ---- - # Документация API сайтов СП ## Вступление diff --git a/USERS.md b/USERS.md index ea4a567..52532c4 100644 --- a/USERS.md +++ b/USERS.md @@ -1,9 +1,3 @@ ---- -title: 'Как сделать вход на сайт с помощью сайтов СП?' -layout: 'layout.11ty.js' -permalink: '/users/' ---- - # Как сделать вход на сайт с помощью сайтов СП? ## Аутентификация diff --git a/_data/eleventyComputed.js b/_data/eleventyComputed.js new file mode 100644 index 0000000..1099761 --- /dev/null +++ b/_data/eleventyComputed.js @@ -0,0 +1,3 @@ +module.exports = { + permalink: data => `${data.page?.fileSlug.toLowerCase().replace('readme', '')}/index.html` || null +}; diff --git a/_data/layout.js b/_data/layout.js new file mode 100644 index 0000000..e7227fa --- /dev/null +++ b/_data/layout.js @@ -0,0 +1 @@ +module.exports = 'layout.11ty.js'; diff --git a/_includes/layout.11ty.js b/_includes/layout.11ty.js index 6d8b8e4..29bef9a 100644 --- a/_includes/layout.11ty.js +++ b/_includes/layout.11ty.js @@ -15,7 +15,7 @@ module.exports = { - ${data.title} - Документация SPWorlds + ${content.match(/<h1>(.*)<\/h1>/)[0].slice(4, -5)} - Документация SPWorlds