ページごとに説明とキーワードを作成する方法を見つけようとしています。
タイトルの場合は次のようになります。
{{title=some page title in here}}
説明については、次のようにします。
{{description=some description per page in here}}
また、キーワードのメタ タグについては、次のようにします。
{{keywords=example keyword, per each page, this is an example}}
preg_replace + regex 解析でこれを達成するにはどうすればよいでしょうか。また、ページ自体には表示されませんが、次のような実際のメタ情報に配置されます。
<title> some page title in here </title>
<meta name="description" content="some description per page in here">
<meta name="keywords" content="example keyword, per each page, this is an example">
サンプル ページは次のようになります。
{{title=some page title in here}}
{{description=some description per page in here}}
{{keywords=example keyword, per each page, this is an example}}
<div id="content">
<h4> Some page title here </h4>
<p> Some page paragraphs here. </p>
</div> <!--#content-->
もちろん、結果は次のようになります。
<html>
<head>
<title> Website Title - some page title in here </title>
<meta name="description" content="some description per page in here">
<meta name="keywords" content="example keyword, per each page, this is an example">
</head>
<body>
<div id="content">
<h4> Some page title here </h4>
<p> Some page paragraphs here. </p>
</div> <!--#content-->
</body>
</html>
助けてくれてありがとう。