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

Clean up hugo files and some tweaks #1207

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 25 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@

## Overview

- **Static Site Generator**: [GatsbyJS](https://www.gatsbyjs.org/) +
- **Static Site Generator**: [Hugo](https://gohugo.io/) +
[TypeScript](https://www.typescriptlang.org/) +
[CSS Modules](https://github.com/css-modules/css-modules) +
[MDX](https://mdxjs.com/)
- **Linting**: [ESLint](https://eslint.org/) +
[StyleLint](https://stylelint.io/)
- **Hosting**: [Firebase](https://firebase.google.com/docs/hosting)
- **Hosting**: [Cloudflare Pages](https://pages.cloudflare.com/)

## Usage

Expand All @@ -41,69 +37,49 @@ If you need help installing and/or managing Node and NPM versions, check out [NV
### Installation

```sh
npm install && npm run prepare
npm install
```

#### Explanation
- `npm install` installs the necessary node modules for development.

* `npm install` installs the neccessary node modules for development.
* `npm run prepare` sets up the linting pre-commit hooks via husky.
#### Install Hugo

### Development

#### Development Server

The development server watches files, rebuilds the site, and reloads the browser
when files change.
##### Homebrew (macOS)

```sh
npm run develop
brew install hugo
```

#### Static Server

The static server is useful for testing features that might only be relevant to
the production build, such as CSP Policies, SRI hashes, Firebase routing
rules (301/302 redirects or url rewrites), and Firebase functions.
##### Debian / Ubuntu

It is recommended that you install
[the latest release of Hugo](https://github.com/gohugoio/hugo/releases/latest).
For debian and ubuntu users, they offer a .deb file.

```sh
npm run build && npm run serve
```

### Testing
##### Other OS

```sh
npm run test # runs all tests
npm run test:unit # runs unit tests
npm run test:regressions # runs regression tests
```
See [Hugo Installation](https://gohugo.io/getting-started/installing/)

### Deployments
#### Install Embedded Dart Sass

This project has two environments: staging environment and production. All
preview links are deployed to the staging environment. The production
environment can only be deploy to via a PR being merged into `main`.
Download
[Embedded Dart Sass](https://github.com/sass/dart-sass-embedded/releases) and
make sure it is in your `$PATH`. This is necessary for Hugo to process SASS and
SCSS files. See the
[Hugo documentation](https://gohugo.io/hugo-pipes/scss-sass/) for more
information.

#### Preview Link Generation
### Development

All PRs will be assigned a preview link during the CI/CD process. These links
are good for 7 days. To regenerate a link, delete the comment and run the CI/CD
action again.
#### Development Server

Users authenticated with the Firebase CLI can generate an ad-hoc preview link
site by running the following from the root of the project.
The development server watches files, rebuilds the site, and reloads the browser
when files change.

```sh
npm run build && npm run preview
hugo server
```

#### Firebase Functions

**Firebase function resources are shared throughout environments.** If two PRs
have changes to Firebase functions, the deployed functions will be those of the
PR whose `Firebase - Staging` GitHub workflow has run most recently.

### Updating Release Notes for the New Year

Whenever you create your first release note for a product category for a new
Expand Down
11 changes: 11 additions & 0 deletions assets/scss/_recaptcha.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.grecaptcha-badge {
bottom: 20px !important;
left: -2px !important;
overflow: hidden !important;
transition: all 0.3s ease !important;
width: 70px !important;
}

.grecaptcha-badge:hover {
width: 256px !important;
}
1 change: 1 addition & 0 deletions assets/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@import 'tag';
@import 'schema';
@import 'release-note';
@import 'recaptcha';

*:focus {
outline-color: var(--mm-color-logo-blue-light);
Expand Down
6 changes: 0 additions & 6 deletions content/.prettierrc.js

This file was deleted.

129 changes: 0 additions & 129 deletions content/geoip/_geoip-overview.mdx

This file was deleted.

55 changes: 0 additions & 55 deletions content/geoip/_geolite-overview.mdx

This file was deleted.

Loading