-
-
Notifications
You must be signed in to change notification settings - Fork 217
Use external file to show always up-to-date pihole.toml
content
#1215
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
✅ Deploy Preview for pihole-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Mkdocs generates a static site. I guess it will include the toml file once it builds but does not dynamically updates the content when the toml changes. Additionally, the page looks very long now, maybe it's enough to to show the first 50-100 lines or so. |
I thought the idea was to show all options in a single place. Showing just part of the file doesn't make sense. |
Yes. We need to update the docs when a new version is released, but the most recent toml file will be automatically imported every time. |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/quick-reference-for-v6-settings/78925/2 |
would it be better to just link this page? https://github.com/pi-hole/FTL/blob/master/test/pihole.toml it would require no fancy shenanigans to keep updated as it would always be the latest release version |
I don't think using this file is the best option. This file is used for tests and if, in the future, we decide to add invalid values in this file to test some functions, the docs example will show invalid values. I still think the best approach is to generate a |
## Pi-hole configuration file example - `pihole.toml`: | ||
|
||
```toml | ||
--8<-- "https://raw.githubusercontent.com/pi-hole/FTL/refs/heads/master/test/pihole.toml" |
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.
@rdwebdesign it does look like that file is all that is being embedded, though - how could one generate it to include here otherwise without spinning up a container or similar?
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 don't understand your question.
Embed a file is exactly the intention of this PR, but the file above was used just as an example. This PR is not finished (it's a draft).
As explained, we (Pi-hole team) need to create a process (probably during the build process) to generate/update a file with the default values and host this file in our server (the URL is not defined yet).
When this is done, this new file will be used to generate the Docs Page.
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.
Understood, thanks. Had missed that this PR was draft and intending to embed something more "true" than the test file.
What does this PR aim to accomplish?
As title says.
How does this PR accomplish the above?
Using snippets (already used) to import an external URL with the most recent
pihole.toml
.By submitting this pull request, I confirm the following:
git rebase
)