From 14edd5b8c1dce573a0ac00e4a5cf69352732b311 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 15 Nov 2019 18:28:10 +0100 Subject: [PATCH] Add further work E.g. add rss feed and sitemap and seo meta tags. --- .../TypoScript/Setup/Config.typoscript | 3 +++ .../Setup/ContentElements/Basic.typoscript | 8 ++++++ .../ContentElements/MenuAbstract.typoscript | 18 ++++++++++--- .../ContentElements/ParseFunc.typoscript | 9 ------- .../Setup/ContentElements/Text.typoscript | 4 +++ .../TypoScript/Setup/Page.typoscript | 8 ++++-- .../TypoScript/Setup/RssFeed.typoscript | 25 +++++++++++++++++ Configuration/TypoScript/constants.typoscript | 1 + Configuration/TypoScript/setup.typoscript | 1 + Resources/Private/Layouts/Page/Default.html | 2 +- .../Private/Partials/BlogPostHeader.html | 5 ++++ Resources/Private/Partials/Menu/Page.html | 3 ++- .../Partials/{TagList.html => TopicList.html} | 8 +++--- .../Private/Sass/components/_feedit.scss | 9 +++++++ Resources/Private/Sass/index.scss | 1 + Resources/Private/Sass/layout/_elements.scss | 2 +- .../ContentElements/MenuAbstract.html | 2 +- .../Private/Templates/Page/BlogPost.html | 9 ++++--- Resources/Private/Templates/Page/Default.html | 10 +++---- .../Private/Templates/Sitemaps/RssFeed.xml | 27 +++++++++++++++++++ Resources/Public/Css/index.css | 2 +- composer.json | 2 +- 22 files changed, 125 insertions(+), 34 deletions(-) create mode 100644 Configuration/TypoScript/Setup/Config.typoscript create mode 100644 Configuration/TypoScript/Setup/RssFeed.typoscript rename Resources/Private/Partials/{TagList.html => TopicList.html} (60%) create mode 100644 Resources/Private/Sass/components/_feedit.scss create mode 100644 Resources/Private/Templates/Sitemaps/RssFeed.xml diff --git a/Configuration/TypoScript/Setup/Config.typoscript b/Configuration/TypoScript/Setup/Config.typoscript new file mode 100644 index 0000000..569a128 --- /dev/null +++ b/Configuration/TypoScript/Setup/Config.typoscript @@ -0,0 +1,3 @@ +config { + absRefPrefix = auto +} diff --git a/Configuration/TypoScript/Setup/ContentElements/Basic.typoscript b/Configuration/TypoScript/Setup/ContentElements/Basic.typoscript index 6fef62b..cdcb351 100644 --- a/Configuration/TypoScript/Setup/ContentElements/Basic.typoscript +++ b/Configuration/TypoScript/Setup/ContentElements/Basic.typoscript @@ -11,4 +11,12 @@ lib.contentElement { layoutRootPaths { 10 = EXT:ds_site/Resources/Private/Layouts/ContentElements/ } + + stdWrap { + editIcons = tt_content: + editIcons { + beforeLastTag = -1 + iconTitle = Edit Content Element + } + } } diff --git a/Configuration/TypoScript/Setup/ContentElements/MenuAbstract.typoscript b/Configuration/TypoScript/Setup/ContentElements/MenuAbstract.typoscript index 851a475..ddaa3bf 100644 --- a/Configuration/TypoScript/Setup/ContentElements/MenuAbstract.typoscript +++ b/Configuration/TypoScript/Setup/ContentElements/MenuAbstract.typoscript @@ -1,4 +1,4 @@ -tt_content.menu_abstract =< lib.contentElement +tt_content.menu_abstract < lib.contentElement tt_content.menu_abstract { templateName = MenuAbstract dataProcessing { @@ -22,6 +22,12 @@ tt_content.menu_abstract { orderBy = sorting as = compatibleWith } + + 11 < .10 + 11 { + where = sys_category_record_mm.uid_foreign = {field:uid} AND sys_category.parent = 1 + as = topics + } } } @@ -31,7 +37,7 @@ tt_content.menu_abstract { special > special = categories special.value { - data = GP:tag_id + data = GP:topic_id intval = 1 } } @@ -47,11 +53,15 @@ tt_content.menu_abstract { where = uid = ###UID### markers { UID { - data = GP:tag_id + data = GP:topic_id intval = 1 } } - as = tagForFilter + as = topic } } + + stdWrap { + editIcons := appendString(header, header_layout, pages, layout) + } } diff --git a/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript b/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript index 0428bfd..f5659f5 100644 --- a/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript +++ b/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript @@ -11,15 +11,6 @@ lib.parseFunc { } } tags { - link = TEXT - link { - current = 1 - typolink { - parameter.data = parameters : allParams - extTarget = {$styles.content.links.extTarget} - } - parseFunc.constants = 1 - } pre = USER pre { userFunc = DanielSiepmann\DsSite\UserFunction\CodeHighlighting->preTag diff --git a/Configuration/TypoScript/Setup/ContentElements/Text.typoscript b/Configuration/TypoScript/Setup/ContentElements/Text.typoscript index fa30184..5b7fec5 100644 --- a/Configuration/TypoScript/Setup/ContentElements/Text.typoscript +++ b/Configuration/TypoScript/Setup/ContentElements/Text.typoscript @@ -1,4 +1,8 @@ tt_content.text =< lib.contentElement tt_content.text { templateName = Text + + stdWrap { + editIcons := appendString(header, header_layout, layout, bodytext) + } } diff --git a/Configuration/TypoScript/Setup/Page.typoscript b/Configuration/TypoScript/Setup/Page.typoscript index b0c298f..b6fcd2b 100644 --- a/Configuration/TypoScript/Setup/Page.typoscript +++ b/Configuration/TypoScript/Setup/Page.typoscript @@ -4,6 +4,10 @@ page { index = EXT:ds_site/Resources/Public/Css/index.css } + meta { + viewport = width=device-width, initial-scale=1 + } + 10 = FLUIDTEMPLATE 10 { templateName { @@ -40,7 +44,7 @@ page { where.insertData = 1 leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid orderBy = count DESC, sys_category.title ASC - as = assignedTags + as = assignedTopics } 11 < .10 11 { @@ -71,7 +75,7 @@ page { selectFields = sys_category.*, count(sys_category_record_mm.uid_foreign) as count where = sys_category.parent = 1 AND sys_category_record_mm.uid_foreign IS NOT NULL groupBy = sys_category.uid - as = allTags + as = allTopics } 101 < .100 101 { diff --git a/Configuration/TypoScript/Setup/RssFeed.typoscript b/Configuration/TypoScript/Setup/RssFeed.typoscript new file mode 100644 index 0000000..b268d4f --- /dev/null +++ b/Configuration/TypoScript/Setup/RssFeed.typoscript @@ -0,0 +1,25 @@ +plugin.tx_seo { + view { + templateRootPaths { + 20 = EXT:ds_site/Resources/Private/Templates/Sitemaps/ + } + } + config { + xmlSitemap { + sitemaps { + rssFeedAllBlogPosts { + provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider + config { + table = pages + sortField = sorting + lastModifiedField = tstamp + additionalWhere = AND (no_index = 0 OR no_follow = 0) + pid = 2 + recursive = 3 + template = RssFeed + } + } + } + } + } +} diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index eb8c385..3df6319 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -1,3 +1,4 @@ +@import 'EXT:seo/Configuration/TypoScript/XmlSitemap/constants.typoscript' pageUids { blogPosts = 2 } diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 7d841a1..52c0c68 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -1,3 +1,4 @@ +@import 'EXT:seo/Configuration/TypoScript/XmlSitemap/setup.typoscript' @import 'EXT:ds_site/Configuration/TypoScript/Setup/' @import 'EXT:ds_site/Configuration/TypoScript/Setup/ContentElements/' diff --git a/Resources/Private/Layouts/Page/Default.html b/Resources/Private/Layouts/Page/Default.html index 3d676b4..5293ec0 100644 --- a/Resources/Private/Layouts/Page/Default.html +++ b/Resources/Private/Layouts/Page/Default.html @@ -5,7 +5,7 @@ {settings.websiteTitle} diff --git a/Resources/Private/Partials/BlogPostHeader.html b/Resources/Private/Partials/BlogPostHeader.html index b7f6277..1e87cb7 100644 --- a/Resources/Private/Partials/BlogPostHeader.html +++ b/Resources/Private/Partials/BlogPostHeader.html @@ -16,5 +16,10 @@ {version.data.title}{f:if(condition: '!{i.isLast}', then: ',')}

+

Topics: + + {topic.data.title}{f:if(condition: '!{i.isLast}', then: ',')} + +

diff --git a/Resources/Private/Partials/Menu/Page.html b/Resources/Private/Partials/Menu/Page.html index 5f82430..95f4720 100644 --- a/Resources/Private/Partials/Menu/Page.html +++ b/Resources/Private/Partials/Menu/Page.html @@ -4,7 +4,8 @@ link: page.link, title: page.title, blogPost : page.data, - compatibleWith: page.compatibleWith + compatibleWith: page.compatibleWith, + topics: page.topics })} {page.data.abstract -> f:format.html()} diff --git a/Resources/Private/Partials/TagList.html b/Resources/Private/Partials/TopicList.html similarity index 60% rename from Resources/Private/Partials/TagList.html rename to Resources/Private/Partials/TopicList.html index 71ed487..e4ba313 100644 --- a/Resources/Private/Partials/TagList.html +++ b/Resources/Private/Partials/TopicList.html @@ -3,11 +3,11 @@