acid-info / logos-docusaurus-plugins

Docusaurus plugins for Logos websites
2 stars 4 forks source link

[feature] - set typography theme as part of config #67

Closed amirhouieh closed 1 year ago

amirhouieh commented 1 year ago

In recent future, we might need to be able to be able to adjust/customize typography of the website. We are talking about a few parameters typeface and font-size(s)

@jeangovil is this possible, if so can you estimate the amount of work?

jeangovil commented 1 year ago

@amirhouieh, This is definitely possible, we could easily provide an option for customized LSD themes; the only complication is that we're currently using two sets of LSD themes ― one for standalone pages and one for docs and blogs. I think it'd be best if we could resolve this issue first, so we'd be sure about the requirements. Once that's done, it shouldn't take more than an hour to implement.

amirhouieh commented 1 year ago

@amirhouieh, This is definitely possible, we could easily provide an option for customized LSD themes; the only complication is that we're currently using two sets of LSD themes ― one for standalone pages and one for docs and blogs. I think it'd be best if we could resolve this issue first, so we'd be sure about the requirements. Once that's done, it shouldn't take more than an hour to implement.

ok, thanks ! so this should be resolve on LSD level or the application of LSD in the plugin? And eitherway how much of work that would be?

Also worth mentioning it might also be relevant here https://github.com/acid-info/lpe-frontend/issues/68

jeangovil commented 1 year ago

ok, thanks ! so this should be resolve on LSD level or the application of LSD in the plugin? And eitherway how much of work that would be?

LSD already supports customized themes, so this should be resolved in the plugin.

jeangovil commented 1 year ago

preset configuration example:

  presets: [
    [
      '@acid-info/logos-docusaurus-preset',
      /** @type {import('@acid-info/logos-docusaurus-preset').PluginOptions} */
      ({
        businessUnit: 'Logos',
        theme: {
          name: 'default',
          options: {
            typography: {
              genericFontFamily: 'monospace',
            },
            customCss: [require.resolve('./src/css/custom.scss')],
          },
        },
      }),
    ],
  ],