diff options
author | Victoria Dye <vdye@github.com> | 2022-10-27 20:17:11 +0300 |
---|---|---|
committer | Victoria Dye <vdye@github.com> | 2022-10-27 20:17:11 +0300 |
commit | 51c8e488333c84700926640d024b44c78ed7ad9d (patch) | |
tree | 136596831bdb28e11c0d39700ca54903c68c8e07 | |
parent | 45bc5d3f3db430506d3d58a9a07875837ad5e6cd (diff) |
lib/tasks/index.rake: skip building 'technical/scalar.txt'
The documentation built from Git includes both 'Documentation/scalar.txt'
and 'Documentation/technical/scalar.txt'. Because 'index_doc()' builds the
documentation by basename, these two files conflict, ultimately resulting in
only the latter being saved to the DB.
Long-term, the cleanest permanent solution to this problem is to rename
'technical/scalar.txt' to something else in Git. In the meantime, to ensure
that the (more important) command documentation is rendered at the
git-scm.com/docs/scalar URL, skip the 'technical/scalar.txt' build entirely.
This commit should be reverted when 'technical/scalar.txt' has been renamed
in Git.
Signed-off-by: Victoria Dye <vdye@github.com>
-rw-r--r-- | lib/tasks/index.rake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tasks/index.rake b/lib/tasks/index.rake index 3ac0f5ab..3ee615a9 100644 --- a/lib/tasks/index.rake +++ b/lib/tasks/index.rake @@ -262,6 +262,8 @@ def index_doc(filter_tags, doc_list, get_content) path, sha = entry ids = Set.new([]) docname = File.basename(path, ".txt") + # TEMPORARY: skip the scalar technical doc until it has a non-overlapping name + next if path == "Documentation/technical/scalar.txt" next if doc_limit && path !~ /#{doc_limit}/ file = DocFile.where(name: docname).first_or_create |