mieweb / wikiGDrive

Wiki for Google Shared Drive
15 stars 6 forks source link

Running hugo in preview mode automatically when a sync is finished. #270

Open horner opened 2 years ago

horner commented 2 years ago

1) Would be nice to run hugo on the server 2) Need tutorial to make hugo project

hugo new site example
cd example
echo theme = \"ananke\" >> config.toml
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo contentDir = \"WikiGDriveTest\" >> >> config.toml
git submodule add https://github.com/mieweb/WikiGDriveTest.git
hugo server -D
horner commented 2 years ago

@ggodlewski an I discussed having this fire off automatically after a sync is completed as static HTML. Have nginx serve that content

http://wikigdrive.com/drive/1pfUcPgmEnzTFnlwap90XHXfRIJ1vqTgr/ Would be: http://wikigdrive.com/preview/1pfUcPgmEnzTFnlwap90XHXfRIJ1vqTgr/

http://wikigdrive.com/drive/1pfUcPgmEnzTFnlwap90XHXfRIJ1vqTgr/folder/1REyI7L8GbgpHo6eTVsQJ0jAwHhGEJ-1q/1G4xwfBdH5mvEQyGN16TD2vFUHP8aNgU7wPst-2QTZug Would be: http://wikigdrive.com/preview/1pfUcPgmEnzTFnlwap90XHXfRIJ1vqTgr/example-folder/document-in-a-folder.html

horner commented 2 years ago

If multiple themes exists:

http://wikigdrive.com/drive/1pfUcPgmEnzTFnlwap90XHXfRIJ1vqTgr/folder/1REyI7L8GbgpHo6eTVsQJ0jAwHhGEJ-1q/1G4xwfBdH5mvEQyGN16TD2vFUHP8aNgU7wPst-2QTZug Would be: http://wikigdrive.com/preview/1pfUcPgmEnzTFnlwap90XHXfRIJ1vqTgr/{{theme}}/example-folder/document-in-a-folder.html

{{theme}} could be empty if there is only one theme, but if there are multiple themes, we would have the subfolder.