Skip to content

Allow LibreAutomate documentation to be served locally using "docfx serve" #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dksyks
Copy link

@dksyks dksyks commented Mar 1, 2025

I obviously don't know whether you are interested in this contribution. My motivation is that I don't like the code upon which I have built something to get upgraded and thereby break what I have made unless I have lots of time on my hands. The problem with online documentation is that it advances and no longer corresponds to what I have on my system. So I don't much like it either. At least not as a primary source of documentation. So I have been hesitant to adopt LA, or really any code, where I don't have an easily accessed local copy of the documentation.

Maybe it is just me.

Anyway, in this pull request I have setup LA to use a local copy of the documentation specific to the build that is running. To do so, I have...

  1. Created an LA workspace that just encompasses the \scripts directory. I suspect you used LA for the whole solution in parallel with visual studio but I wanted a more circumscribed view in LA of just the scripts. This is located in the directory \LA.Workspace.For.Scripts. There is a readme.txt file in that directory to describe how to setup the workspace for the uninitiated (me).
  2. Rewrote the main scripts in Au docs.cs to make the information flow a little more clear (to me).
  3. Added several settings to AppSettings.cs
  4. Added a tab in DOptions.cs for Tools --> options. Tab is called Docs and is for adjusting the settings in AppSettings.cs.
  5. Added a private function in HelpUtils that calls docfx.exe serve if needed and shuts it down when LA exits if local documentation is turned on.

To make the code more universally useful, either the docs would need to be included in the installation program (7MB compressed) or they would have to be downloaded on demand. Then of course docfx would need to be present (70 MB downloaded). I did not address this as I have my copy and I am not too sure you are going to incorporate these changes.

… to scripts in Au docs .cs for building docss. Changes to LA to give option to direct help to local site using docfx serve.
@dksyks
Copy link
Author

dksyks commented Mar 1, 2025

a picture is worth a thousand words:
image

and

image

@qgindi
Copy link
Owner

qgindi commented Mar 4, 2025

Thank you. Next LA will have option to use local documentation of the installed LA version: Options > Other > Documentation. Already implemented in the last git commit. It uses a simple built-in HTTP server instead of docfx. Auto-downloads the documentation archive for that LA version from the LA website, where it is uploaded by the Au docs script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants