Generate SUMMARY.md for gitbook.io.

This commit is contained in:
Zhang Huangbin 2014-09-21 12:59:56 +08:00
parent 3b3e0ec86f
commit e8238b130d
3 changed files with 71 additions and 18 deletions

View File

@ -1,7 +1,5 @@
# How to
* [Allow user to send email without authentication ](src/default/4-howto/allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](src/default/4-howto/amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](src/default/4-howto/completely.disable.amavisd.clamav.spamassassin.md)
@ -18,26 +16,16 @@
* [SQL: Create an mail alias account with SQL command line ](src/default/4-howto/sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](src/default/4-howto/store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](src/default/4-howto/unattended.iredmail.installation.md)
# Third-party integrations.
* [How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](src/default/5-integrations/sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](src/default/6-cluster/full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup and Restore
* [How to migrate old iRedMail server to the latest stable release](src/default/7-backup-restore/migrate.to.new.iredmail.server.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd ](src/default/9-troubleshooting/turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](src/default/9-troubleshooting/turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP ](src/default/9-troubleshooting/turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Password hashes](src/default/99-faq/password.hashes.md)
* [Why append timestamp in maildir path](src/default/99-faq/why.append.timestamp.in.maildir.path.md)

60
SUMMARY.md Normal file
View File

@ -0,0 +1,60 @@
# How to
* [Allow user to send email without authentication ](4-howto/allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](4-howto/amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](4-howto/completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](4-howto/configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](4-howto/disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](4-howto/enable.smtps.md)
* [LDAP: Add an alias domain ](4-howto/ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account ](4-howto/ldap.add.mail.alias.md)
* [LDAP: Add a mail list account ](4-howto/ldap.add.mail.list.md)
* [LDAP: User mail forwarding. ](4-howto/ldap.user.mail.forwarding.md)
* [Pipe incoming email for certain user to external script ](4-howto/pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantine clean mail into SQL database](4-howto/quarantining.clean.mail.md)
* [Force Dovecot to recalculate mailbox quota ](4-howto/recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line ](4-howto/sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](4-howto/store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](4-howto/unattended.iredmail.installation.md)
# Third-party integrations.
* [How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](5-integrations/sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](6-cluster/full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup and Restore
* [How to migrate old iRedMail server to the latest stable release](7-backup-restore/migrate.to.new.iredmail.server.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd ](9-troubleshooting/turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](9-troubleshooting/turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP ](9-troubleshooting/turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Password hashes](99-faq/password.hashes.md)
* [Why append timestamp in maildir path](99-faq/why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication ](howto/allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](howto/amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](howto/completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](howto/configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](howto/disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](howto/enable.smtps.md)
* [LDAP: Add an alias domain ](howto/ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account ](howto/ldap.add.mail.alias.md)
* [LDAP: Add a mail list account ](howto/ldap.add.mail.list.md)
* [LDAP: User mail forwarding. ](howto/ldap.user.mail.forwarding.md)
* [Pipe incoming email for certain user to external script ](howto/pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantine clean mail into SQL database](howto/quarantining.clean.mail.md)
* [Force Dovecot to recalculate mailbox quota ](howto/recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line ](howto/sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](howto/store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](howto/unattended.iredmail.installation.md)
# Third-party integrations.
* [How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](integrations/sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](cluster/full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup and Restore
* [How to migrate old iRedMail server to the latest stable release](backup-restore/migrate.to.new.iredmail.server.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd ](troubleshooting/turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](troubleshooting/turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP ](troubleshooting/turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Password hashes](faq/password.hashes.md)
* [Why append timestamp in maildir path](faq/why.append.timestamp.in.maildir.path.md)

View File

@ -15,6 +15,7 @@ SOURCE_DIR="${PWD}/src"
OUTPUT_DIR="${PWD}/html"
INDEX_MD="${OUTPUT_DIR}/index.md"
README_MD="${PWD}/README.md"
GITBOOK_MD="${PWD}/SUMMARY.md"
[ -d ${OUTPUT_DIR} ] || mkdir -p ${OUTPUT_DIR}
@ -63,12 +64,14 @@ for chapter_dir in ${all_chapter_dirs}; do
if [ -f ${_title_md} ]; then
# generate index info of chapter
_chapter_title="$(cat ${_title_md})"
echo -e "\n# ${_chapter_title}\n" >> ${INDEX_MD}
echo -e "\n# ${_chapter_title}\n" >> ${README_MD}
echo -e "# ${_chapter_title}" >> ${INDEX_MD}
echo -e "# ${_chapter_title}" >> ${README_MD}
echo -e "# ${_chapter_title}" >> ${GITBOOK_MD}
if [ -f ${_summary_md} ]; then
echo -e "\n\n$(cat ${_title_md})\n\n" >> ${INDEX_MD}
echo -e "\n\n$(cat ${_title_md})\n\n" >> ${README_MD}
echo -e "$(cat ${_title_md})" >> ${INDEX_MD}
echo -e "$(cat ${_title_md})" >> ${README_MD}
echo -e "$(cat ${_title_md})" >> ${GITBOOK_MD}
fi
fi
@ -84,7 +87,8 @@ for chapter_dir in ${all_chapter_dirs}; do
for article_file in ${all_chapter_articles}; do
article_file_basename="$(basename ${article_file})"
article_html_file="$(strip_name_prefix ${article_file_basename})"
article_file_without_prefix="$(echo ${article_file/#\.\//})"
article_file_without_prefix_path="$(echo ${article_file/#\.\//})"
article_file_without_prefix="$(strip_name_prefix ${article_file})"
# Replace '.md' suffix by '.html'
article_html_file="$(echo ${article_html_file/%.md/.html})"
@ -96,7 +100,8 @@ for chapter_dir in ${all_chapter_dirs}; do
echo "* [${_article_title}](${chapter_dir_in_article}/${article_html_file})" >> ${INDEX_MD}
# 'src/default/' is path to view source file on bitbucket.org
echo "* [${_article_title}](src/default/${article_file_without_prefix})" >> ${README_MD}
echo "* [${_article_title}](src/default/${article_file_without_prefix_path})" >> ${README_MD}
echo "* [${_article_title}](${article_file_without_prefix})" >> ${GITBOOK_MD}
${CMD_CONVERT} ${article_file} ${_output_chapter_dir} \
title="${_article_title}" \