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

Make font-family as configurable parameter(#220) #294

Merged
merged 13 commits into from
Jan 22, 2018
Merged

Make font-family as configurable parameter(#220) #294

merged 13 commits into from
Jan 22, 2018

Conversation

cowlingj
Copy link
Contributor

@cowlingj cowlingj commented Dec 15, 2017

Motivation

issue: #220

Test Plan

  1. Edit siteConfig.js to include fonts object with keys mapped to arrays of font names
fonts: {
  myKey: [
    "Times New Roman",
    "Serif"
  ],
  myOtherKey: [
    "-apple-system",
    "system-ui"
  ]
},
  1. add the corresponding keys as font-family variables in a css file in the form $
h1 {
  font-family: $myKey;
}
  1. run server

Jonathan Cowling added 2 commits December 15, 2017 12:11
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 15, 2017
@JoelMarcey
Copy link
Contributor

@cowlingj Thank you very much for this PR to fix the currently hard coded font-family issue.

Did you try, locally, using your new approach in main.css and see if the Docusaurus site, the test site that comes with running docusaurus-init, or any other site would load the same with the proper fonts?

@JoelMarcey
Copy link
Contributor

@cowlingj Hi. Just pinging to see what site you tested this change on? Thanks!

@cowlingj
Copy link
Contributor Author

I've tested both, first adding custom fonts in the siteConfig.js and custom.css of both, then the docusarus site by building and running with npm, and a site ran with docusarus-init by calling start-server.js directly.

@JoelMarcey
Copy link
Contributor

My Prettier work here is becoming a bit funny. I will get it :)

Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cowlingj I am going to merge this in now. Thank you very much!

@JoelMarcey JoelMarcey merged commit a241a46 into facebook:master Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants