Skip to content

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rdwebdesign
Copy link
Member

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:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for pihole-docs ready!

Name Link
🔨 Latest commit 5c4a05a
🔍 Latest deploy log https://app.netlify.com/sites/pihole-docs/deploys/67da3c8f45ec630008121994
😎 Deploy Preview https://deploy-preview-1215--pihole-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yubiuser
Copy link
Member

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.

@rdwebdesign
Copy link
Member Author

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.

@rdwebdesign
Copy link
Member Author

I guess it will include the toml file once it builds but does not dynamically updates the content when the toml changes.

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.

@pralor-bot
Copy link
Collaborator

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

@mwoolweaver
Copy link
Contributor

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

@rdwebdesign
Copy link
Member Author

rdwebdesign commented Apr 6, 2025

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 pihole.toml file using the default values.

## Pi-hole configuration file example - `pihole.toml`:

```toml
--8<-- "https://raw.githubusercontent.com/pi-hole/FTL/refs/heads/master/test/pihole.toml"
Copy link

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?

Copy link
Member Author

@rdwebdesign rdwebdesign Apr 7, 2025

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.

Copy link

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.

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.

5 participants