no link from title if README.md doesn't exist

This commit is contained in:
kynd 2016-11-06 13:19:17 +09:00
parent 25830f77c6
commit a5afb3e31d
1 changed files with 7 additions and 3 deletions

View File

@ -32,9 +32,13 @@ error_reporting(0);
}
if (file_exists($folder.'TITLE'.$language.'.md') and file_exists($folder.'SUMMARY'.$language.'.md')) {
echo '<a href="'.$folder.'">';
echo $Parsedown->text(file_get_contents($folder.'TITLE'.$language.'.md'));
echo '</a>';
if (file_exists($folder.'README.md')) {
echo '<a href="'.$folder.'">';
echo $Parsedown->text(file_get_contents($folder.'TITLE'.$language.'.md'));
echo '</a>';
} else {
echo $Parsedown->text(file_get_contents($folder.'TITLE'.$language.'.md'));
}
if (file_exists($folder.'SHORT_SUMMARY'.$language.'.md')) {
echo $Parsedown->text(file_get_contents($folder.'SHORT_SUMMARY'.$language.'.md'));