You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In paper is already a type section. This makes it much easier for us to calculate standard info/properties/values in some places. We have an interface Page shared between Article- and Section-Pages.
More Examples
/test-homepage/ could also have the sub_typefrontpage.
/themen/* with sub_typethemen for easier cache header
/authors/ with sub_typeauthor for custom commercial settings
The text was updated successfully, but these errors were encountered:
edit: @bobaaaaa
if there is only one main type section, why do we need subtypes in the first place? maybe promote all suggested subtypes to main types instead?
That could theoretically also work. The thing is, in paper we have a union (base) type for all pages (section & all articles). That means the typescript compiler would see something like this:
// with type "section" + subtypesfunctionfoo(page: Page){// page.type === 'article' | 'video' | 'gallery' | 'embed' | 'external' | 'author' | 'section'if(page.type==='section'){// do something on all sections}}// with type "frontpage", "advertorial" + no subtypesfunctionfoo(page: Page){// page.type === 'article' | 'video' | 'gallery' | 'embed' | 'external' | 'author' | 'frontpage' | 'advertorial'if(page.type==='frontpage'||page.type==='advertorial'){// do something on all sections}}
That is sometimes also hard for the article pages. There is no "base" identifier for content/detail pages.
What
Currently, we only have:
I would like to introduce the following addition (naming tbd):
In paper is already a type
section
. This makes it much easier for us to calculate standard info/properties/values in some places. We have an interfacePage
shared between Article- and Section-Pages.More Examples
/test-homepage/
could also have thesub_type
frontpage
./themen/*
withsub_type
themen
for easier cache header/authors/
withsub_type
author
for custom commercial settingsThe text was updated successfully, but these errors were encountered: