Skip to content
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

Provide way to override title of home page #957

Closed
hadley opened this issue Jan 9, 2019 · 18 comments
Closed

Provide way to override title of home page #957

hadley opened this issue Jan 9, 2019 · 18 comments

Comments

@hadley
Copy link
Member

@hadley hadley commented Jan 9, 2019

Since package title might not always be appropriate (since CRAN might require quoting)

@maelle
Copy link
Collaborator

@maelle maelle commented Apr 15, 2019

Ah something else I'd like to see implemented! Would it be ok to make it work via a title field of the config?

Then in data_home()

pagetitle = pkg$desc$get("Title")[[1]]

could become

pagetitle = pkg$meta[["title"]] %||% pkg$desc$get("Title")[[1]]

?

If so I can make a PR.

@jayhesselberth

This comment has been hidden.

@maelle

This comment has been hidden.

@maelle
Copy link
Collaborator

@maelle maelle commented May 14, 2019

This has to be re-opened cf #1005 (comment): my implementation used a param name that was already used for something else, so I've opened a PR removing my changes as requested by @jayhesselberth.

@hadley hadley reopened this May 14, 2019
@hadley
Copy link
Member Author

@hadley hadley commented May 17, 2019

I suggest we make it a subcomponent of home:

home:
  title: "This is my package title"

@maelle

This comment has been hidden.

@hadley hadley added this to the pkgdown 1.4 milestone May 17, 2019
@hadley

This comment has been hidden.

@hadley

This comment has been hidden.

@maelle

This comment has been hidden.

@maelle
Copy link
Collaborator

@maelle maelle commented May 19, 2019

Btw would a similar parameter for "og:description" make sense? The Description field from DESCRIPTION also contains quotes.

@maelle
Copy link
Collaborator

@maelle maelle commented May 19, 2019

I mean tweaking

opengraph = list(description = pkg$desc$get("Description")[[1]])

into

opengraph = list(description = pkg$meta$home[["description"]] %||% pkg$desc$get("Description")[[1]])

I can open a separate issue (or add that to my open PR) if of interest.

@hadley

This comment has been hidden.

@maelle

This comment has been hidden.

@hadley

This comment has been hidden.

@maelle
Copy link
Collaborator

@maelle maelle commented May 20, 2019

Would it be too extreme for pkgdown to unquote all quoted words of Title and Description (uncranify them) by default? Only for the ' quotes. Users might still want to use the home fields in config for more customization (or to requote words). 🤔

@hadley
Copy link
Member Author

@hadley hadley commented May 20, 2019

Oh yes, that's a good idea!

@maelle

This comment has been hidden.

@hadley

This comment has been hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants