Skip to content

Rework hugo.toml file. #214

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

Merged
merged 20 commits into from
Jun 26, 2024
Merged

Rework hugo.toml file. #214

merged 20 commits into from
Jun 26, 2024

Conversation

stumbo
Copy link
Member

@stumbo stumbo commented Mar 15, 2024

Updated 2024.06.12

Replace hugo.toml configuration file with a collection of .yaml files in the config directory. This breaks functionality into smaller chunks that are centered around a specific topic area. That said, the params.yaml file is still a bit of a grab bag of options.

  • Shared configuration files are in the _default subdirectory directory
  • Environment specific files are in production, staging and development subdirectories
  • Added additional comments with configuration options to provide better definition on its purpose
  • Production environment set to enable Google Analytics, site crawling

Added a robots.txt file that disallows crawling. This file is automatically replaced in when running in production with a version that allows crawling.

Updated Github action to specify environment. Environment is set as an environment variable. This could be further enhanced by passing in a value as a repository secret.

Updates to README.md

stumbo added 3 commits March 15, 2024 02:04
Convert to yaml and break into subsections.
Move to config directory.
Start setup to support Production and Staged deployments
Code Highlighting cleaned up and better commented.
Updated `software/install-and-run/windows/native/_index.md` to test
and validate code block processing.
@stumbo
Copy link
Member Author

stumbo commented Mar 16, 2024

Still a work in progress, but I want to start socializing the work. This PR starts cleaning up the hugo.toml file. I'm trying to figure out what parts are antiquated and no longer used and document the options that we are using. Where possible I'm trying to add in links back into the Docsy or Hugo documentation where the options are more fully explained.

As part of this activity, I've converted from toml to yaml -- it's a bit of a personal choice, in that I find the yaml easier to read.

Hugo now lets me divide the configuration information across multiple files, which should help colocate information. There is some top level information in the hugo.yaml file that doesn't neatly fit into a sub-file based on the naming conventions.

A follow on activity will be creating environment specific files for deploying to production, staging or running locally. I haven't put a lot of effort into those files yet.

enable: true
yes: 'Glad to hear it! Please <a href="https://github.com/Interlisp/medley/issues/new?template=documentation.md&projects=Interlisp/medley/5">tell us how we can improve</a>.'
no: 'Sorry to hear that. Please <a href="https://github.com/Interlisp/medley/issues/new?template=documentation.md&projects=Interlisp/medley/5">tell us how we can improve</a>.'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of per-page asking for feedback, but I havent seen any.
Is it how we're asking?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly - I really have no idea how much feedback other sites get from this type of setup.  

But, I can imagine that with longer documents you have an issue with users even getting to the feedback button.  If, the information isn't useful, they'll be long gone before they get to it.

# respectDoNotTrack: Check for Do Not Track in headers
# useSessionStorage: Store session information in storage and
# not in cookies
privacy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what and where is our "privacy policy" and does everyone know?
What do we want to say about our non-promise of privacy when using online? (For diagnostic purposes etc)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is new to us -- it is one of the areas I noticed in poking around.  I took an initial cut at settings, but I'm open to suggestions. I would like someone that understand GDPR to weigh in and suggest any needed changes.


## Important Notes
1. The file system from Medley's perspective differs somewhat from the file system from Window's perspective. Specifically, within Medley, the file system root (i.e., "{DSK}/" or "{UNIX}/") is mapped to the ***install_dir*** in the Windows file system. For example, if ***install_dir*** is ***C:\Users\Frank\Medley1***, then the Medley file known as ***{DSK}\<testdir>testfile.txt*** will be located in the Windows file system at ***C:\Users\Frank\Medley1\testdir\testfile.txt***

1. The file system from Medley's perspective differs somewhat from the file system from Window's perspective. Specifically, within Medley, the file system root (i.e., "{DSK}/" or "{UNIX}/") is mapped to the ***install_dir*** in the Windows file system. For example, if ***install_dir*** is ***C:\Users\Frank\Medley1***, then the Medley file known as ***{DSK}\<testdir>testfile.txt*** will be located in the Windows file system at ***C:\Users\Frank\Medley1\testdir\testfile.txt***

2. Also, from Medley you can refer to any file on a Windows drive using the reference ***{DSK}/[drive letter]/*** (or equivalently ***{DSK}<[drive letter]>***). For example, ***C:\User\Frank\Downloads\testfile.txt*** in Windows will be ***{DSK}/c/User/Frank/Downloads/testfile.txt*** in Medley.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately this section depends on "native" vs "wsl". With wsl, the drive letter is prefixed with /mnt/<driveletter>, e.g.,

   {DSK}/mnt/d/Users/Frank/Downloads/testfile.txt
or
   {DSK}<mnt>c>Users>Frank>Downloads/testfile.txt

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - my changes in this section were only editorial, cleaning up some of the markdown and using it to validate the code highlighting was working correctly - the addition of powershell on lines 53 and 63 will cause the markdown the code blocks to have syntactical highlighting for powershell.  The blank lines I added are bring the formatting into compliance with standard markdown formatting.

@masinter
Copy link
Member

masinter commented Jun 9, 2024

On Linux in WSL, a user would find the windows file system by using /mnt/drive-letter/ e.g., you will find C:\Users\Larry at {DSK}/mnt/c/users/larry (or should this say {DSK}<mnt>c>Users>Larry>. Before we get to far, should we change the cygwin installation to use /mnt/drive-letter vs /drive-letter

Or at least point out the difference in the two setups?

There was at one time a interlisp.org/software/ page on the file system(s) mappings.

@stumbo stumbo self-assigned this Jun 12, 2024
@stumbo stumbo marked this pull request as ready for review June 12, 2024 11:29
@stumbo
Copy link
Member Author

stumbo commented Jun 21, 2024

On Linux in WSL, a user would find the windows file system by using /mnt/drive-letter/ e.g., you will find C:\Users\Larry at {DSK}/mnt/c/users/larry (or should this say {DSK}<mnt>c>Users>Larry>. Before we get to far, should we change the cygwin installation to use /mnt/drive-letter vs /drive-letter

Or at least point out the difference in the two setups?

There was at one time a interlisp.org/software/ page on the file system(s) mappings.

@masinter Larry - I'm not sure how to address this comment.  Is there a specific file that this comment relates to?  I need some more context to figure out what, if anything, to do with it.

@masinter
Copy link
Member

ask @lispcore or at least @fghalasz who set up the cygwin mount points. I think in general the idea is if you can't decide, ask someone else for an opinion.

Copy link
Member

@fghalasz fghalasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. toml->y(a)ml changes look ok and work just fine on a local Hugo server. Editorial fixes all OK.

@stumbo stumbo merged commit fe70f7b into main Jun 26, 2024
@stumbo stumbo deleted the staging branch June 26, 2024 18:28
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.

3 participants