Generate README.md for index.

This commit is contained in:
Zhang Huangbin 2014-09-17 22:14:00 +08:00
parent efe28b8e4a
commit 73aff46d81
4 changed files with 23 additions and 5 deletions

View File

View File

@ -14,6 +14,7 @@ PWD="."
SOURCE_DIR="${PWD}/src"
OUTPUT_DIR="${PWD}/html"
INDEX_MD="${OUTPUT_DIR}/index.md"
README_MD="${OUTPUT_DIR}/README.md"
[ -d ${OUTPUT_DIR} ] || mkdir -p ${OUTPUT_DIR}
@ -61,11 +62,11 @@ for chapter_dir in ${all_chapter_dirs}; do
# generate index info of chapter
_chapter_title="$(cat ${_title_md})"
echo "# ${_chapter_title}" >> ${INDEX_MD}
echo "# ${_chapter_title}" >> ${README_MD}
if [ -f ${_summary_md} ]; then
echo -e "\n\n" >> ${INDEX_MD}
echo "$(cat ${_title_md})" >> ${INDEX_MD}
echo -e "\n\n" >> ${INDEX_MD}
echo -e "\n\n$(cat ${_title_md})\n\n" >> ${INDEX_MD}
echo -e "\n\n$(cat ${_title_md})\n\n" >> ${README_MD}
fi
fi
@ -89,6 +90,7 @@ for chapter_dir in ${all_chapter_dirs}; do
_article_title="$(head -1 ${article_file} | awk -F'#' '{print $2}')"
#echo "article title: ${_article_title}"
echo "* [${_article_title}](${chapter_dir_in_article}/${article_html_file})" >> ${INDEX_MD}
echo "* [${_article_title}](${chapter_dir}/${article_file})" >> ${INDEX_MD}
${CMD_CONVERT} ${article_file} ${_output_chapter_dir} title="${_article_title}"
done
@ -100,5 +102,4 @@ done
${CMD_CONVERT} ${INDEX_MD} ${OUTPUT_DIR} css='./css/markdown.css' title="iRedMail Documentations"
# Cleanup
#rm -f ${INDEX_MD}
mv ${INDEX_MD} ${PWD}
rm -f ${INDEX_MD}

View File

@ -9,29 +9,46 @@
<h1 id="frequently-asked-questions">Frequently Asked Questions</h1>
<ul>
<li><a href="faq/why.append.timestamp.in.maildir.path.html"> Why append timestamp in maildir path</a></li>
<li><a href="./3-faq/./3-faq/why.append.timestamp.in.maildir.path.md"> Why append timestamp in maildir path</a></li>
</ul>
<h1 id="how-to">How to</h1>
<ul>
<li><a href="howto/allow.user.to.send.email.without.authentication.html"> How to allow user to send email without authentication
</a></li>
<li><a href="./4-howto/./4-howto/allow.user.to.send.email.without.authentication.md"> How to allow user to send email without authentication
</a></li>
<li><a href="howto/amavisd.no.x-spam.headers.html"> Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.</a></li>
<li><a href="./4-howto/./4-howto/amavisd.no.x-spam.headers.md"> Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.</a></li>
<li><a href="howto/completely.disable.amavisd.clamav.spamassassin.html"> How to completely disable amavisd/ClamAV/SpamAssassin</a></li>
<li><a href="./4-howto/./4-howto/completely.disable.amavisd.clamav.spamassassin.md"> How to completely disable amavisd/ClamAV/SpamAssassin</a></li>
<li><a href="howto/disable.spam.virus.scanning.for.outgoing.mails.html"> How to disable spam virus scanning for outgoing mails</a></li>
<li><a href="./4-howto/./4-howto/disable.spam.virus.scanning.for.outgoing.mails.md"> How to disable spam virus scanning for outgoing mails</a></li>
<li><a href="howto/howto.configure.thunderbird.for.iredmail.html"> Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)</a></li>
<li><a href="./4-howto/./4-howto/howto.configure.thunderbird.for.iredmail.md"> Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)</a></li>
<li><a href="howto/howto.enable.smtps.service.html"> How to enable SMTPS service (SMTP over SSL, port 465)</a></li>
<li><a href="./4-howto/./4-howto/howto.enable.smtps.service.md"> How to enable SMTPS service (SMTP over SSL, port 465)</a></li>
<li><a href="howto/pipe.incoming.email.for.certain.user.to.external.script.html"> How to pipe incoming email for certain user to external script </a></li>
<li><a href="./4-howto/./4-howto/pipe.incoming.email.for.certain.user.to.external.script.md"> How to pipe incoming email for certain user to external script </a></li>
<li><a href="howto/quarantining.clean.mail.html"> How to quarantine clean mail into SQL database</a></li>
<li><a href="./4-howto/./4-howto/quarantining.clean.mail.md"> How to quarantine clean mail into SQL database</a></li>
<li><a href="howto/recalculate.mailbox.quota.html"> How to force Dovecot to recalculate mailbox quota
</a></li>
<li><a href="./4-howto/./4-howto/recalculate.mailbox.quota.md"> How to force Dovecot to recalculate mailbox quota
</a></li>
<li><a href="howto/store.spamassassin.bayes.in.sql.html"> How to store spamassassin bayes in SQL</a></li>
<li><a href="./4-howto/./4-howto/store.spamassassin.bayes.in.sql.md"> How to store spamassassin bayes in SQL</a></li>
<li><a href="howto/unattended.iredmail.installation.html"> How to perform silent/unattended iRedMail installation</a></li>
<li><a href="./4-howto/./4-howto/unattended.iredmail.installation.md"> How to perform silent/unattended iRedMail installation</a></li>
<li><a href="howto/use.or.migrate.password.hashes.html"> How to use or migrate password hashes</a></li>
<li><a href="./4-howto/./4-howto/use.or.migrate.password.hashes.md"> How to use or migrate password hashes</a></li>
</ul>
<h1 id="backup-and-restore">Backup and Restore</h1>
<ul>
<li><a href="backup-restore/migrate.to.new.iredmail.server.html">How to migrate old iRedMail server to the latest stable release</a></li>
<li><a href="./5-backup-restore/./5-backup-restore/migrate.to.new.iredmail.server.md">How to migrate old iRedMail server to the latest stable release</a></li>
</ul>
<h1 id="troubleshooting-and-debug">Troubleshooting and Debug</h1>
<ul>
<li><a href="troubleshooting/turn.on.debug.mode.in.dovecot.html"> How to turn on debug mode in Dovecot</a></li>
<li><a href="./9-troubleshooting/./9-troubleshooting/turn.on.debug.mode.in.dovecot.md"> How to turn on debug mode in Dovecot</a></li>
</ul></body></html>