Skip to content
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

Available Modules: Custom inserted text #721

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

lbarraga
Copy link
Contributor

@lbarraga lbarraga commented Sep 17, 2024

This PR add a feature where custom MarkDown can be inserted into the available software MarkDown files.
The custom text files will be located at mkdocs/docs/HPC/only/gent/available_software/custom and must match the name of the module exactly.

For example:

  • mkdocs/docs/HPC/only/gent/available_software
    • custom/ (new)
      • ...
      • Python.md
      • ...
    • detail/
      • ...
      • Python.md
      • ...

Where the content of custom/Python.md is:

We have a dedicated page on Python available [here](../../../../python.md).
For more info on python virtual environments, check out [this page](../../../../setting_up_python_virtual_environments.md)

After running scripts/available_software/available_software.py, the contents of detail/Python.md will be

Python
======

We have a dedicated page on Python available [here](../../../../python.md).
For more info on python virtual environments, check out [this page](../../../../setting_up_python_virtual_environments.md)

# Available modules


The overview below shows which Python installations are available per HPC-UGent Tier-2 cluster, ordered based on software version (new to old).
...

This PR already adds custom/ entries for AlphaFold, OpenFOAM, MATLAB and Python.
Files in the custom/ directory are excluded from search by mkdocs

@lbarraga lbarraga marked this pull request as draft September 17, 2024 13:54
@boegel boegel marked this pull request as ready for review September 19, 2024 11:47
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

@lbarraga Please also add some basic instructions in scripts/available_software/README on how custom bits of text can be injected in the software-specific pages

Alos, add mkdocs/docs/HPC/only/gent/available_software/README.md which explains which files are auto-generated, and which ones are not (custom/*.md)

scripts/available_software/available_software.py Outdated Show resolved Hide resolved
@boegel
Copy link
Member

boegel commented Sep 19, 2024

@lbarraga A next step could be to auto-detect that there's a matching "software-specific best practices page"

This would involve:

  • moving existing files like alphafold.md to software-specific-best-practices/AlphaFold.md (and adding a redirect in config/templates/hpc.template to avoid breaking the https://docs.hpc.ugent.be/alphafold URL);
  • updating the available_software.py script to check whether there's a matching file under software-specific-best-practices, and if so automatically inject a line like "We have a dedicated page on Python available [here](http://localhost:8000/Linux/python/)."
  • clean up the custom/*.md files being added here

Let's make that a separate PR, this one can be merged once missing README files are added

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