-
Notifications
You must be signed in to change notification settings - Fork 205
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
Split out lexicon, plugins and config page content #3195
base: master
Are you sure you want to change the base?
Split out lexicon, plugins and config page content #3195
Conversation
docs/BUILD
Outdated
outs = ["lexicon.html"], | ||
cmd = [ | ||
'"$TOOLS_LEX" -i docs/lexicon.html -i docs/lexicon_entry.html docs/rules.json > "$OUT"', | ||
'"$TOOLS_TMPL" --template docs/template.html --in lexicon.html > tmp.html', | ||
'mv docs/lexicon_content.html "$OUT"', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
And more accurately, why not:
genrule(
name = "lexicon_html",
srcs = deps + [
":lexicon_content",
"template.html",
],
outs = ["lexicon.html"],
cmd = [
'"$TOOL" --template docs/template.html --in docs/lexicon_content.html > "$OUT"',
],
tools = ["//docs/tools/templater"],
visibility = ["//docs/test/..."],
)
similarly below.
I'm not a fan of how the command relies on filenames rather than using $SRCS
, but I'm guessing the template implicitly depends on the files in deps
, which makes it hard to use the dict-style srcs
docs/BUILD
Outdated
@@ -80,43 +89,62 @@ filegroup( | |||
) | |||
|
|||
genrule( | |||
name = "plugins_html", | |||
name = "plugins_content", | |||
srcs = deps + [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed deps in the other two _content targets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I've mentioned on #3192 , I'm unclear that building a search index ourselves is the right approach to take. We should agree on the approach to take before making more code changes.
In the documentation site, extract out the pre-templater content of the pages,
lexicon.html
,plugins.html
andconfig.html
into separate build targets, so that they can be used to build out a search index. In the search index, we do not want the content which the templater adds fromtemplate.html
.I have tested this by ensuring that these three generated templated pages before, and after these changes are the same: