Martin Koníček

Blog

NextJS - global font with css style module

Showcase image

I was wondering, how to set-up global font module using css style module in NextJS, here is how.

layout.tsx

import { Poppins } from 'next/font/google';

const poppins = Poppins({
  weight: ['700'],
  subsets: ['latin'],
  variable: '--poppins-font',
});

export default function RootLayout({
...
  return (
    <html lang="en">
      <body className={`myclasses ${poppins.variable}`}>
...

page.tsx

import styles from './styles.module.css'

style.module.css

.menu {
  font-family: var(--poppins-font),sans-serif;
}
  • SOPS Git Hooks for Kubernetes Secrets Management
    SOPS Git Hooks for Kubernetes Secrets ManagementI decided to build a Git-based tool to manage Kubernetes secrets more efficiently. The whole idea was to automatically encrypt password and value fields in my Kubernetes YAML and Helm files before committing them into Git, and decrypt them effortlessly when checking out.
  • cs | en