Update and rework project structure with new pagebuilder concept. (based on RK Architekten and SFU Politik configs and sources)

This commit is contained in:
2022-11-17 16:01:52 +00:00
parent 825dfc18f9
commit 30c05143fe
1421 changed files with 3875 additions and 4975 deletions

View File

@@ -1,17 +1,14 @@
const generateArticleSlugUrlString = (article) => {
let slug = article.content.slug
let title = article.content.title
if (!slug || slug === "") {
slug = title
.replace(/[^a-zA-Z0-9 ]/g, "")
const generateUrlString = (text) => {
if (text) {
return text
.replace(/[^a-zA-Z0-9 \/]/g, "")
.replace(/\s/g, "-")
.toLowerCase()
}
return slug
return ""
}
module.exports = {
generateArticleSlugUrlString,
generateUrlString,
}