-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Apache
David Campbell edited this page Nov 23, 2024
·
4 revisions
To setup sscli
a sitemap generator:
# As of this writing:
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
# download and install Node.js (you may need to restart the terminal)
nvm install 22
# verifies the right Node.js version is in the environment
node -v # should print `v22.11.0`
# verifies the right npm version is in the environment
npm -v # should print `10.9.0`
# install sscli
npm i -g static-sitemap-cli
You can create an empty robots.txt
file to allow crawling everything or you can restrict access.
mdbook build --dest-dir /var/www/html/
sscli -b https://<your.domain.name> -r /var/www/html/
touch /var/www/html/robot.txt
# OR
cat > /var/www/html.robots.txt <<EOF
User-agent: *
Allow: /
EOF
Add a 404.md
file to the root directory of your book.
Deploy your site: mdbook build --dest-dir /var/www/html/
Edit /etc/apache2/apache.conf
.
Add the line: ErrorDocument 404 /404.html
Restart Apache: systemctl restart apache2