File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,12 @@ function renderBlog(){
4141 while ( (!$ listPosts && $ currentPost > $ firstPost -blogPostsPerPage && $ currentPost >0 ) || ($ listPosts && $ currentPost > 0 ) ){
4242 $ filename =dirname (__FILE__ )."/content/ " .$ currentPost .'.html ' ;
4343 $ content = file_get_contents ($ filename );
44+ $ content_preview = strip_tags (preg_replace ('/^.+\n/ ' , '' , $ content ));
4445 $ title =strtok ($ content , "\n" );
4546 if ($ permaLink !==false ){
4647 echo ("<meta itemprop= \"name \" content= \"$ title \"> " );
47- echo ("<meta name= \"description \" content= \"$ title \"> " );
48- echo ("<meta name= \"title \" content= \"" .blogName. " \"> " );
48+ echo ("<meta name= \"description \" content= \"$ content_preview \"> " );
49+ echo ("<meta name= \"title \" content= \"$ title \"> " );
4950 }
5051 $ content =substr ($ content , strpos ($ content , "\n" ) + 1 );
5152 if ($ listPosts ){
You can’t perform that action at this time.
0 commit comments