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 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/ftldns/configfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ The configuration file can be found at `/etc/pihole/pihole.toml`, all of the opt
The file can be edited directly, however you can also use the command line option (`pihole-FTL --config`) or the web interface.

There is also an outline of the configuration options in the [api documentation](../api/index.md#accessing-the-api-documentation).

## 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.

```
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ markdown_extensions:
- markdown_include.include:
base_path: docs
- pymdownx.snippets:
# allow include external URL content
url_download: true
# auto_append abbreviations.md to every file
# https://squidfunk.github.io/mkdocs-material/reference/tooltips/#adding-a-glossary
auto_append:
Expand Down