Add further work

E.g. add rss feed and sitemap and seo meta tags.
This commit is contained in:
Daniel Siepmann 2019-11-15 18:28:10 +01:00
parent 82e1fe563e
commit 14edd5b8c1
22 changed files with 125 additions and 34 deletions

View file

@ -0,0 +1,3 @@
config {
absRefPrefix = auto
}

View file

@ -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
}
}
}

View file

@ -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)
}
}

View file

@ -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

View file

@ -1,4 +1,8 @@
tt_content.text =< lib.contentElement
tt_content.text {
templateName = Text
stdWrap {
editIcons := appendString(header, header_layout, layout, bodytext)
}
}

View file

@ -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 {

View file

@ -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
}
}
}
}
}
}

View file

@ -1,3 +1,4 @@
@import 'EXT:seo/Configuration/TypoScript/XmlSitemap/constants.typoscript'
pageUids {
blogPosts = 2
}

View file

@ -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/'

View file

@ -5,7 +5,7 @@
<a href="/">{settings.websiteTitle}</a>
</div>
<nav>
<a href="#">RSS Feed</a>
<a href="{f:uri.page(pageUid: 1. pageType: 1533906435, additionalParams: {sitemap: 'rssFeedAllBlogPosts'})}">RSS Feed</a>
</nav>
</header>

View file

@ -16,5 +16,10 @@
{version.data.title}{f:if(condition: '!{i.isLast}', then: ',')}
</f:for>
</p>
<p>Topics:
<f:for each="{topics}" as="topic" iteration="i">
{topic.data.title}{f:if(condition: '!{i.isLast}', then: ',')}
</f:for>
</p>
</header>
</html>

View file

@ -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()}

View file

@ -3,11 +3,11 @@
<nav>
<h1>{headline}</h1>
<ul>
<f:for each="{tags}" as="tag">
<f:for each="{topics}" as="topic">
<li>
<a href="{f:uri.page(pageUid: 11, additionalParams: {tag: tag.data.uid})}">
{tag.data.title}
{f:if(condition: tag.data.count, then: '({tag.data.count})')}
<a href="{f:uri.page(pageUid: 11, additionalParams: {topic: topic.data.uid})}">
{topic.data.title}
{f:if(condition: topic.data.count, then: '({topic.data.count})')}
</a>
</li>
</f:for>

View file

@ -0,0 +1,9 @@
a.frontEndEditIconLinks {
display: block !important;
height: 2rem;
width: 2rem;
margin-top: $spacer * 3;
background: $blue-dark;
}

View file

@ -12,3 +12,4 @@
@import "layout";
@import "components/codeHighlighting";
@import "components/feedit";

View file

@ -1,11 +1,11 @@
h1, h2, h3, h4, h5, h6 {
small a {
display: none;
color: $gray-500;
}
&:hover small a {
display: inline;
color: $gray-500;
}
}

View file

@ -7,7 +7,7 @@
{f:render(partial: 'Header', arguments: {
uid: data.uid,
layout: data.header_layout,
header: '{data.header} {tagForFilter.0.data.title}'
header: '{data.header} {topic.0.data.title}'
})}
</f:section>

View file

@ -11,7 +11,8 @@
{f:render(partial: 'BlogPostHeader', arguments: {
title: data.title,
blogPost : data,
compatibleWith: compatibleWith
compatibleWith: compatibleWith,
topics: assignedTopics
})}
<a name="introduction"></a>
@ -38,9 +39,9 @@
<f:section name="Aside">
{f:render(section: 'TOC', arguments: _all)}
{f:render(partial: 'TagList', arguments: {
headline: 'Related Tags',
tags: assignedTags
{f:render(partial: 'TopicList', arguments: {
headline: 'Related Topics',
topics: assignedTopics
})}
</f:section>

View file

@ -12,14 +12,14 @@
</f:section>
<f:section name="Aside">
{f:render(partial: 'TagList', arguments: {
{f:render(partial: 'TopicList', arguments: {
headline: 'Compatible with TYPO3',
tags: allTypo3Compatible
topics: allTypo3Compatible
})}
{f:render(partial: 'TagList', arguments: {
headline: 'Tags',
tags: allTags
{f:render(partial: 'TopicList', arguments: {
headline: 'Topics',
topics: allTopics
})}
</f:section>
</html>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Daniel Siepmann - Coding is Art</title>
<description>This is an example of an RSS feed</description>
<link>{f:uri.page(pageUid: 1, absolute: 1)}</link>
<atom:link href="{f:uri.page(pageUid: 1. pageType: 1533906435, additionalParams: {sitemap: 'rssFeedAllBlogPosts'}, absolute: 1)}" rel="self" type="application/rss+xml" />
<lastBuildDate>{f:format.date(date: 'now', format: 'D, d M Y H:i:s O')}</lastBuildDate>
<ttl>1800</ttl>
<f:for each="{items}" as="item">
{f:render(section: 'Item', arguments: {
item: item.data
})}
</f:for>
</channel>
</rss>
<f:section name="Item">
<item>
<title>{item.title}</title>
<description>Here is some text containing an interesting description.</description>
<link>{f:uri.page(pageUid: item.uid, absolute: 1)}</link>
<pubDate>{f:format.date(date: item.lastUpdated, format: 'D, d M Y H:i:s O')}</pubDate>
<guid isPermaLink="true">{f:uri.page(pageUid: item.uid, absolute: 1)}</guid>
</item>
</f:section>

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@
},
"require": {
"php": "^7.3.0",
"typo3/cms-core": "^9.5",
"typo3/cms-core": "*",
"scrivo/highlight.php": "^9.15.10"
},
"extra": {