Pkgdown: Update docs regarding concepts?

Created on 2 Jul 2018  路  5Comments  路  Source: r-lib/pkgdown

The docs currently say "Concepts are not currently well-supported by roxygen2, but may be useful if you write Rd files by hand." but with dev roxygen2 concepts are parsed by, even derived from family tags, and pkgdown use of concept tags is fantastic so definitely useful nowadays, thanks for that! 馃樅 (I've just used dev roxygen2 and pkgdown to get https://itsalocke.com/optirum/reference/ from a very simple config file https://github.com/lockedata/optiRum/blob/master/_pkgdown.yml)

documentation

Most helpful comment

Will update when new roxygen2 is released.

All 5 comments

Will update when new roxygen2 is released.

Related to this, would a helper function generating config parts from such tags i.e for all concepts

reference:
- title: tag1
  contents:
  - has_concept("tag1")
- title: tag2
  contents:
- has_concept("tag2")

make sense? One could then copy paste it in the actual config file.

I suppose template_reference() could be made to write the template for functions by first grouping by family or concept. It would then report functions that aren't in those groups.

# write a template grouped by family
template_reference(family = TRUE)
# write a template grouped by concept
template_reference(concept = TRUE)

Is this what you're thinking?

Oh this is even better than what I was thinking! 馃専 Reporting functions that aren't in groups would be so useful.

Two questions:

  • Would the template feature function names or has_concept commands?

  • Reg family vs. concept I thought that this didn't make any difference? In the new roxygen2 version all family tags in .R get translated to concept tags in .Rd so I tend to see those as equivalent, one should use family tags to get both concepts in .Rd and links between functions in the local documentation I think? But I might be missing something!

Yes I was thinking that template_reference(concepts = TRUE) would automatically generate:

reference:
- title: concepts
  contents:
  - has_concept("this")
  - has_concept("that")
- title: other
  contents:
  - other
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fazendaaa picture Fazendaaa  路  9Comments

maelle picture maelle  路  6Comments

espinielli picture espinielli  路  3Comments

stufield picture stufield  路  5Comments

privefl picture privefl  路  3Comments