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

Comments

@hadley
Copy link
Member

commented Jan 9, 2019

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

@maelle

This comment has been minimized.

Copy link
Contributor

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 was marked as outdated.

Copy link
Collaborator

commented Apr 15, 2019

Yes, that looks like the right change. Can you make a PR?

@maelle

This comment was marked as outdated.

Copy link
Contributor

commented Apr 15, 2019

Will do, will just wait for my other PR to be merged in order to have learned lessons and not make the same mistakes twice! :-)

@maelle

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member Author

commented May 17, 2019

I suggest we make it a subcomponent of home:

home:
  title: "This is my package title"
@maelle

This comment was marked as resolved.

Copy link
Contributor

commented May 17, 2019

So there would be a "general" title and a title under home, correct?

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

@hadley

This comment was marked as resolved.

Copy link
Member Author

commented May 17, 2019

@maelle do you want to take another stab at this?

@hadley

This comment was marked as resolved.

Copy link
Member Author

commented May 17, 2019

Yes exactly (sorry for out of order reply)

@maelle

This comment was marked as resolved.

Copy link
Contributor

commented May 17, 2019

Yep, will try to next week!

@maelle

This comment has been minimized.

Copy link
Contributor

commented May 19, 2019

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

@maelle

This comment has been minimized.

Copy link
Contributor

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 was marked as resolved.

Copy link
Member Author

commented May 19, 2019

Is that used on every page or just the home page?

@maelle

This comment was marked as resolved.

Copy link
Contributor

commented May 20, 2019

Just the homepage I think

default_data <- list(

out$opengraph <- list(description = strip_html_tags(out$description$contents))

@hadley

This comment was marked as resolved.

Copy link
Member Author

commented May 20, 2019

Great — please wrap that up into your PR too.

@maelle

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

Oh yes, that's a good idea!

@maelle

This comment was marked as resolved.

Copy link
Contributor

commented May 20, 2019

In a separate PR or the same?

@hadley

This comment was marked as resolved.

Copy link
Member Author

commented May 20, 2019

I think it can be in the same PR since it's going to touch the same code.

@hadley hadley added the wip label May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.