docs icon indicating copy to clipboard operation
docs copied to clipboard

Use external file to show always up-to-date `pihole.toml` content

Open rdwebdesign opened this issue 8 months ago • 7 comments

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.

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

rdwebdesign avatar Mar 19 '25 03:03 rdwebdesign

Deploy Preview for pihole-docs ready!

Name Link
Latest commit 7897c4748a24f442ddd2746f6003cefbd4618600
Latest deploy log https://app.netlify.com/projects/pihole-docs/deploys/6847509a03b7e50008601ad2
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 project configuration.

netlify[bot] avatar Mar 19 '25 03:03 netlify[bot]

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.

yubiuser avatar Mar 19 '25 07:03 yubiuser

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 avatar Mar 19 '25 07:03 rdwebdesign

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.

rdwebdesign avatar Mar 19 '25 07:03 rdwebdesign

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

pralor-bot avatar Apr 06 '25 20:04 pralor-bot

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

mwoolweaver avatar Apr 06 '25 22:04 mwoolweaver

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.

rdwebdesign avatar Apr 06 '25 22:04 rdwebdesign

@DL6ER

Is it possible to copy the pihole.toml file to https://ftl.pi-hole.net/master/pihole.toml (or https://ftl.pi-hole.net/development/pihole.toml or any other place) during the build process?

If this is too complex, I think we can use the current file, used on the tests.

rdwebdesign avatar Jun 09 '25 21:06 rdwebdesign

I tried with https://github.com/pi-hole/FTL/pull/2537

Add It works and once it reaches master the file is accessible at https://ftl.pi-hole.net/master/pihole.toml

The remaining question would be how to trigger the re-build once the file updates?

yubiuser avatar Jun 22 '25 20:06 yubiuser

To be honest, I don't think we need to trigger a Docs re-build every time FTL is updated.

Adding the link to the uploaded pihole.toml file will assure the most up-to-date file will always be used every time the docs are updated. I think this is enough.

rdwebdesign avatar Jun 22 '25 22:06 rdwebdesign

https://github.com/pi-hole/FTL/pull/2540 was already merged in development. Just waiting for the code to be merged into master.

rdwebdesign avatar Jul 02 '25 01:07 rdwebdesign

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Oct 25 '25 10:10 github-actions[bot]

I think this PR has been superseded by https://github.com/pi-hole/FTL/pull/2558 which will update the config file whenever changes are made in the FTL repo modifying the config file.

yubiuser avatar Oct 26 '25 18:10 yubiuser

Superseded by: https://github.com/pi-hole/FTL/pull/2558 and https://github.com/pi-hole/docs/pull/1258

rdwebdesign avatar Oct 26 '25 19:10 rdwebdesign