-
-
Notifications
You must be signed in to change notification settings - Fork 46
Override LOCALIPADD with localhost in documentation generation #657
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
Conversation
|
@Tearran 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
…eration Co-authored-by: Tearran <[email protected]>
Co-authored-by: Tearran <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A+ interpretation
|
#654 @igorpecovnik this should fix issue unnecessary ip changes in the document.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did note that the docs.armbian.com show "<your-ip>" while here we are using "localhost". perhaps we should conform to established convention ""
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR overrides the LOCALIPADD variable with localhost when using the --doc flag to generate documentation, ensuring URLs in the generated documentation show localhost instead of environment-specific IP addresses.
- Adds a single line to detect
--docargument and overrideLOCALIPADDvariable - Updates all service URLs in documentation from specific IP addresses to localhost
- Preserves operational functionality while making documentation IP-agnostic
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
When generating documentation using
armbian-config --doc, URLs in the generated documentation currently show actual IP addresses (e.g.,http://192.168.1.100:8080) which are not useful for documentation purposes.This PR implements a minimal fix by overriding the
LOCALIPADDvariable withlocalhostwhen the--docoption is used, ensuring all generated URLs show localhost instead of environment-specific IP addresses.Changes Made
File:
bin/armbian-config[[ "$1" == "--doc" ]] && LOCALIPADD="localhost"config.runtime.shis loaded to ensure URLs are generated with localhostTechnical Implementation
The fix works by detecting the
--docargument early in the execution flow and overridingLOCALIPADDbefore the runtime configuration loads. This ensures that whenupdate_sub_submenu_datafunctions generate URLs, they uselocalhostinstead of the actual system IP address.Before/After Examples
Before:
After:
Testing
This change is minimal, surgical, and only affects documentation generation while preserving all existing functionality.
Fixes #656.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.