-
Host and automate your DocC documentation
Find out how you can easily host your Swift package and framework DocC documentation online. We'll take you through configuring your web server to host your generated DocC archives, and help you learn to use the xcodebuild tool to automate documentation generation and keep your web content synchronized and up to date.
Recursos
Vídeos relacionados
WWDC21
-
Buscar neste vídeo...
-
-
4:49 - Custom routing in a .htaccess file
# Enable custom routing. RewriteEngine On # Route documentation and tutorial pages. RewriteRule ^(documentation|tutorials)\/.*$ SlothCreator.doccarchive/index.html [L] # Route files within the documentation archive. RewriteRule ^(css|js|data|images|downloads|favicon\.ico|favicon\.svg|img|theme-settings\.json|videos)\/.*$ SlothCreator.doccarchive/$0 [L] -
9:17 - Build documentation on the command line
# Build documentation for the project. xcodebuild docbuild \ -scheme "SlothCreator" \ -derivedDataPath MyDerivedDataFolder # Find all the built documentation archives # to copy them to another location. find MyDerivedDataFolder \ -name "*.doccarchive" -
9:18 - Build and update the hosted documentation
#!/bin/sh # Build the SlothCreator documentation. xcodebuild docbuild \ -scheme "SlothCreator" \ -derivedDataPath MyDerivedDataPath # Copy the documentation archive to ~/www where we # host the SlothCreator website and documentation. find MyDerivedDataPath \ -name "*.doccarchive" \ -exec cp -R {} ~/www \;
-