diff --git a/content/article/int-management.md b/content/article/int-management.md index 4908b72..3f883d8 100644 --- a/content/article/int-management.md +++ b/content/article/int-management.md @@ -76,14 +76,16 @@ After finishing all necessary edits, add a commit message, and press `Commit cha To recompile the site and include any unpublished changes, either: - include the keyword `!publish!` in a commit message, or - click the button `Publish` of the preview website toolbar. - # Site management via local repository clone {#local-repo} Making changes via a local clone of the site repository is recommended especially for larger scale edits, modifications of the site as well as for testing purposes. However, it has a slightly higher overhead and requires installing some software. The key benefits of making edits on a repository clone, over the preview page include: - Running a localhost server for previewing changes (before they are committed). -- Making, testing, and committing edits to multiple files concurrently (rather than editing entries individually). +- Making, and committing edits to multiple files concurrently (rather than editing entries individually). - Having a local copy of all modifications before they are committed. +- Working with unpublished (draft) material. - Making edits using a Markdown editor, rather than a Git textbox. +- Making non-destructive tests end edits. +- Making and testing theme modifications. ## Required tools and installations To manage the site you first need to install: @@ -152,23 +154,24 @@ Hugo has three main ways of compiling/building a site: ### Create a local HTTP server {#local-server} -Navigate to the root folder of the cloned repository (by the previous example that would be `cd c:/users/me/repo/`), and do one of the following: -- To create a local server accessible via a browser, that follows real-time changes to your repo clone, do: - ``` - hugo server - ``` -- To do the same *including all draft content*, do: +Hugo allows running a localhost server which updates in real-time to follow any changes. To run a local server, navigate to the root folder of the cloned repository (by the previous example that would be `cd c:/users/me/repo/`), and do: +``` +hugo server +``` +To *include all draft content* in the localhost server, do: ``` hugo server -D ``` +Hugo will start a local server (by default this is at http://localhost:1313/). The server will update with any change made to Markdown entries of the site, or to the theme. + Additional options for this command are: - `--navigateToChanged` -> automatically navigate to a page that is being edited. - `--noHTTPCache` -> prevent HTTP caching. ### Compile site locally via Hugo {#build} -Compiling the site locally via Hugo requires a local clone of the repository. Navigate to the root folder of the cloned repository via the terminal (by the previous example that would be `cd c:/users/me/repo/`), and do: +Navigate to the root folder of the cloned repository via the terminal (by the previous example that would be `cd c:/users/me/repo/`), and do: ``` hugo ``` @@ -179,10 +182,16 @@ The contents of `/public/` can be uploaded to a file server (e.g. via FileZilla) *Note: To compile the site including draft content do: `hugo -D` (do not upload this version).* ### Compile portable offline version of the site {#offline} -Hugo allows compiling portable versions of the site, that can be copied and run on USB sticks (for example). -To render an offline portable version, do: +Hugo allows compiling portable versions of the site which can be copied and run on a USB stick (for example). +To render an offline portable version of the site, do: ``` hugo -e offline ``` -This will also compile the site at `/public/`. \ No newline at end of file +This will also output the compiled site at `/public/`. + +# Debugging + +For debugging see ![How to break or debug this site](article:int-break). + +*Note: If the site does not update after a `publish` command, there is likely an error that prevents the server from rebuilding the site.* \ No newline at end of file