samredai opened a new pull request #9:
URL: https://github.com/apache/iceberg-docs/pull/9


   This includes a new front-matter setting `javadocLink` that is a boolean. 
The link to the javadocs is unique in that it requires a calculation on which 
javadoc version to link to based on the current version of the docs site the 
user is looking at. However, site params can't be used directly within 
front-matter.
   
   So this PR achieves this using the logic in `menu-filetree.html` which is 
triggered when `javadocLink: true` and uses the following calculation to 
determine the javadoc site:
   `{{ .Page.Site.BaseURL }}/../../javadocs/{{ 
.Page.Site.Params.versions.iceberg }}`.
   
   As an example:
   
   - A user is on `https://iceberg.apache.org/docs/0.12.1/spark-queries`
   - Therefore, `{{ .Page.Site.BaseURL }}` resolves to 
`https://iceberg.apache.org/docs/0.12.1`
   - Also, `{{ .Page.Site.Params.versions.iceberg }}` resolves to `0.12.1`
   - So then `{{ .Page.Site.BaseURL }}/../../javadocs/{{ 
.Page.Site.Params.versions.iceberg }}` resolves to 
`https://iceberg.apache.org/docs/0.12.1/../../javadocs/0.12.1` which is 
`https://iceberg.apache.org/javadocs/0.12.1`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to