{*{strip}*}
	<title>{if isset($title)}{$title} - {/if}{if isset($config.website_name)}{$config.website_name}{/if}</title>

	<meta charset="{$config.charset}">

    {if $description}<meta name="description" content="{$description nofilter}">{/if}
    {if $keywords}<meta name="keywords" content="{$keywords nofilter}">{/if}

	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="robots" content="index,follow">

	<meta property="og:locale" content="ru_RU">
	<meta property="og:site_name" content="{$config.website_name}">
	<meta property="og:type" content="website">
	<meta property="twitter:card" content="summary_large_image">

    {if isset($article) AND !empty($article)}
		<meta property="og:url" content="{$SITE_URL}{$article.url}">
		<meta property="og:title" content="{$article.title nofilter}">
        {if isset($description) && !empty($description)}
			<meta property="og:description" content="{$description nofilter}">
        {elseif $article}
			<meta property="og:description" content="{$article.content|strip_tags|replace:'&nbsp;':''|regex_replace:"!\s+!":" "|regex_replace:"/[\r\n]*/":""|truncate:300 nofilter}">
        {/if}
		<meta property="og:image" content="{if isset($article.image.large)}{$GLOBAL_URL}{$article.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
		<link rel="image_src"  href="{if isset($article.image.large)}{$GLOBAL_URL}{$article.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">

		<meta property="twitter:url" content="{$SITE_URL}{$article.url}">
		<meta property="twitter:title" content="{$title nofilter}">
		<meta property="twitter:description" content="{if isset($description)}{$description nofilter}{/if}">
		<meta property="twitter:image" content="{if isset($article.image.large)}{$GLOBAL_URL}{$article.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
    {elseif isset($product) AND !empty($product)}
	    <meta property="og:url" content="{$SITE_URL}{$product.url}">
	    <meta property="og:title" content="{$product.title nofilter}">
        {if isset($description) && !empty($description)}
		    <meta property="og:description" content="{$description nofilter}">
        {elseif $product}
		    <meta property="og:description" content="{$product.content|strip_tags|replace:'&nbsp;':''|regex_replace:"!\s+!":" "|regex_replace:"/[\r\n]*/":""|truncate:300 nofilter}">
        {/if}
	    <meta property="og:image" content="{if isset($product.image.large)}{$GLOBAL_URL}{$product.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
	    <link rel="image_src"  href="{if isset($product.image.large)}{$GLOBAL_URL}{$product.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">

	    <meta property="twitter:url" content="{$SITE_URL}{$product.url}">
	    <meta property="twitter:title" content="{$title nofilter}">
	    <meta property="twitter:description" content="{if isset($description)}{$description nofilter}{/if}">
	    <meta property="twitter:image" content="{if isset($product.image.large)}{$GLOBAL_URL}{$product.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
    {elseif isset($project) AND !empty($project)}
	    <meta property="og:url" content="{$SITE_URL}{$project.url}">
	    <meta property="og:title" content="{$project.title nofilter}">
        {if isset($description) && !empty($description)}
		    <meta property="og:description" content="{$description nofilter}">
        {elseif $project}
		    <meta property="og:description" content="{$project.content|strip_tags|replace:'&nbsp;':''|regex_replace:"!\s+!":" "|regex_replace:"/[\r\n]*/":""|truncate:300 nofilter}">
        {/if}
	    <meta property="og:image" content="{if isset($project.image.large)}{$GLOBAL_URL}{$project.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
	    <link rel="image_src"  href="{if isset($project.image.large)}{$GLOBAL_URL}{$project.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">

	    <meta property="twitter:url" content="{$SITE_URL}{$project.url}">
	    <meta property="twitter:title" content="{$title nofilter}">
	    <meta property="twitter:description" content="{if isset($description)}{$description nofilter}{/if}">
	    <meta property="twitter:image" content="{if isset($project.image.large)}{$GLOBAL_URL}{$project.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
    {else}
		<meta property="og:url" content="{$SITE_URL}">
		<meta property="og:title" content="{$title nofilter}">
	    <meta property="og:description" content="{if isset($description)}{$description nofilter}{/if}">
		<meta property="og:image" content="{if isset($section.image.large)}{$GLOBAL_URL}{$section.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
		<link rel="image_src"  href="{if isset($section.image.large)}{$GLOBAL_URL}{$section.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">

		<meta property="twitter:url" content="{$SITE_URL}">
		<meta property="twitter:title" content="{$title nofilter}">
	    <meta property="twitter:description" content="{if isset($description)}{$description nofilter}{/if}">
		<meta property="twitter:image" content="{if isset($section.image.large)}{$GLOBAL_URL}{$section.image.large}{else}{$GLOBAL_URL}/uploads/og-image.jpg{/if}">
    {/if}

{*{/strip}*}