Repository: mkdocs/mkdocs

Issue #1665: How do I now **not** build many pages that I don't want?
Created: 2018-10-24T10:47:45Z
After the pages to nav change postulated in #699 MkDocs now compiles all pages in the source folder. This may be OK for some users but not for others.
For example, my team is using a private Github Wiki to develop end-user documentation for a software project.

we have some wiki pages that are intended to be published as standalone pages,
we have other pages that are "in-development" and should not be deployed at all (or until we deem them "ready")
we have some Markdown files which are "snippets" that are being inlined into other pages via Markdown plugins, and they shouldn't be built as standalone pages at all
we have some pages with editorial notes and discussions

In older MkDocs, the pages section of the config was a convenient way to define which are ready, and to give them structure.
Now MkDocs also builds all those unfinished, internal and snippet pages. In addition, it also throws tons of warnings for invalid links when building those pages that are never intended to be built — which makes catching the actual invalid links hard.
Instead of "opt-in", the system became "catch-all". So:

How do I use the "opt-in" mode?
If there is no way to use the "opt-in" mode, how do I "opt-out" of building some pages?

Duplicate issue #1721: Exclude unreferenced files from output
Created: 2019-01-11T12:55:30Z
Request 1: Add an option to control whether md files that aren't included in the "nav" configuration should be excluded from output. (Currently, an info message for unreferenced files is displayed at build time, but the files are still included in the output directory.)
Request 2: Add an option to control whether image files that aren't referenced in any md file should be excluded from output. (Currently, all image files in the source dir are copied to the output dir, regardless of whether they are referenced or not.)

Closing comment (2019-01-22T14:42:50Z): "Request 1" is definitely a duplicate of #1665. However, one might argue that "Request 2" is not a duplicate. Currently MkDocs does not track which images are actually referenced within pages. In fact, IIRC, all non-page files (including images) are copied before any pages are processed. It would be a significant change to the build process to even make "Request 2" possible. Probably significant enough to require a 2.0 release, which would be a long time off.
Regardless, there are legitimate reasons to expect that there could be images (or other files) in the docs_dir that are not linked from page content, but are linked from page templates and should be included in the output. For example, if  a favicon.ico is included in docs_dir is will replace any favicon.ico from the theme, although it is never linked from page content. A theme might use the same strategy to allow a user to supply a logo image file (say logo.png). This change would cause that to fail. Therefore, I consider this to be an unreasonable request. If you don't want a file to end up in the output, then don't put it in the docs_dir.
I understand the frustration some users have with #1665 as, prior to version 1.0, MkDocs used to have the requested behavior. But images (and other non-page files) have always worked the way they do now.  I'm closing this as a duplicate for "Request 1" and as wontfix for "Request 2."