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

feat: use Eleventy localization features and Eleventy asset processing #337

Merged
merged 53 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
be66e78
feat: use Eleventy localization features
greatislander Jul 28, 2023
a480158
Merge branch 'main' into feat/native-localization
greatislander Jul 31, 2023
64dc6a0
feat: use JavaScript templating more completely in generatePermalink
greatislander Jul 31, 2023
b8e3b4f
feat: add global defaultLanguageDirection data
greatislander Jul 31, 2023
a0789ba
feat: migrate some language functionality to eleventy-plugin-fluid
greatislander Aug 1, 2023
5a49111
chore(deps): bump eleventy-plugin-fluid to 2.0.0
greatislander Aug 2, 2023
d323f9c
feat: use generic YAML file for CMS config (fix #242)
greatislander Aug 2, 2023
be8b595
feat: simplify configuration, use default build directory
greatislander Aug 2, 2023
b596a8d
feat: prefix build helper directories with underscore
greatislander Aug 2, 2023
7b0cf85
feat: use local versions of CMS dependencies
greatislander Aug 2, 2023
f70da4d
chore(deps): bump eleventy-plugin-fluid to 2.1.0
greatislander Aug 2, 2023
2e4e0a3
feat: split linting into separate tasks
greatislander Aug 2, 2023
b8a37d4
feat: split linting into separate tasks
greatislander Aug 2, 2023
eb87a7d
feat: prefix locales directory with underscore, adjust Dockerfile
greatislander Aug 2, 2023
5112150
fix: adjust config
greatislander Aug 2, 2023
9ed7b46
fix: adjust Netlify config
greatislander Aug 2, 2023
ad37c42
chore(docs): update README
greatislander Aug 2, 2023
5e346a3
chore(docs): document how to disable internationalization for a colle…
greatislander Aug 3, 2023
b6cd796
chore(docs): document how to disable internationalization for the ent…
greatislander Aug 3, 2023
c69300e
chore(deps): bump eleventy-plugin-fluid to 2.3.0
greatislander Aug 3, 2023
a1c2f8f
chore(docs): remove Laravel Mix and dist directory references
greatislander Aug 4, 2023
91ba199
fix: resolve issue with French configuration and asset paths
greatislander Aug 4, 2023
2e20419
chore: clean up assets folders
greatislander Aug 4, 2023
ee04478
chore(docs): fix typo
greatislander Aug 4, 2023
5f4a377
fix: improve support for non-localized collections
greatislander Aug 4, 2023
6ad015a
chore(docs): clarify modifications to collections directories
greatislander Aug 4, 2023
ece38d7
chore(docs): add heading for 'Adding a language'
greatislander Aug 4, 2023
fb15745
chore(deps): bump eleventy-plugin-fluid to 2.3.1
greatislander Aug 4, 2023
776dcfd
chore(docs): document locale-specific 11tydata.js files
greatislander Aug 4, 2023
8ed51a1
fix: simplify collection configuration
greatislander Aug 4, 2023
ae09653
feat: add alternate link in head
greatislander Aug 4, 2023
b90f135
fix: correct ignore pattern for markdownlint
greatislander Aug 4, 2023
1277b9b
feat: add YAML linting
greatislander Aug 4, 2023
e824391
fix: add Netlify Identity widget to home page
greatislander Aug 4, 2023
5cef95d
chore(docs): document removal of string localization from feed
greatislander Aug 4, 2023
6a4056f
fix: update sitemap to handle new localization system
greatislander Aug 4, 2023
01f09bc
ci: split workflows
greatislander Aug 4, 2023
4bfe968
ci: split workflows
greatislander Aug 4, 2023
84e30cc
chore(deps): updated Dependabot configuration
greatislander Aug 4, 2023
4c00f38
ci: remove redundant workflow
greatislander Aug 4, 2023
e956fa4
chore(docs): add details to language addition and localized index rem…
greatislander Aug 8, 2023
d036fb2
chore(docs): remove outdated import from README
greatislander Aug 8, 2023
6e952a4
chore(docs): document removing post indexes and feed for all languages
greatislander Aug 8, 2023
2516a31
chore(docs): update instructions for disabling localization in a coll…
greatislander Aug 8, 2023
fa54542
fix: remove unused passthrough copy rule
greatislander Aug 8, 2023
4816585
chore(docs): clarify reference to earlier step
greatislander Aug 8, 2023
19a20c3
chore(docs): update docs to reflect new approach to starting projects…
greatislander Aug 9, 2023
785285c
chore(docs): remove extra step from advanced de-localization method
greatislander Aug 9, 2023
1ebcfbb
feat: add debug script
greatislander Aug 9, 2023
15b9a4e
feat: standardize scripts
greatislander Aug 9, 2023
44ffbd5
chore(docs): fix instructions for disabling collection locale
greatislander Aug 10, 2023
e8ad92d
Merge branch 'main' into feat/native-localization
greatislander Aug 10, 2023
204b185
chore(docs): fix typo in code example
greatislander Aug 10, 2023
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
96 changes: 0 additions & 96 deletions .eleventy.js

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist/**
!.eleventy.js
locales/message.js
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";

module.exports = {
extends: [
"fluid",
"plugin:yml/standard"
],
ignorePatterns: ["_site/", "src/_locales/messages.js", "!.*.cjs", "!.*.js"],
env: {
amd: true,
browser: true,
node: true,
es6: true
},
parserOptions: {
ecmaVersion: 2020
}
};
15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

18 changes: 0 additions & 18 deletions .fluidlintallrc.json

This file was deleted.

34 changes: 21 additions & 13 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,49 @@ about: Create a report to help us improve
title: ''
labels: Bug
assignees: ''

---

## Describe the bug

A clear and concise description of what the bug is.

### To reproduce
Steps to reproduce the behavior:

Steps to reproduce the behaviour:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior
### Expected behaviour

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Technical details

### Desktop
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

### Smartphone / tablet
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
* OS: [e.g. iOS]
* Browser [e.g. chrome, safari]
* Version [e.g. 22]

### Smartphone / tablet

* Device: [e.g. iPhone6]
* OS: [e.g. iOS8.1]
* Browser [e.g. stock browser, safari]
* Version [e.g. 22]

### Assistive technology used
- Name: [Name of assistive technology]
- Version: [e.g. 22]

* Name: [Name of assistive technology]
* Version: [e.g. 22]

## Additional context or notes

Add any other context about the problem here.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ assignees: ''
---

## Is your feature request related to a problem?

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternative solutions you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context or notes

Add any other context or screenshots about the feature request here.
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ updates:
allow:
# Allow direct updates only (for packages named in package.json)
- dependency-type: "direct"
ignore:
- dependency-name: "husky"
versions: [">=5"]
# Enable version updates for npm
- package-ecosystem: github-actions
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check for updates once a month
schedule:
interval: "monthly"
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable MD041 -->

* [ ] This pull request has been linted by running `npm run lint` without errors
* [ ] This pull request has been tested by running `npm run start` and reviewing affected routes
* [ ] This pull request has been built by running `npm run build` without errors
Expand All @@ -13,7 +15,7 @@
2. <!-- Second step -->
3. <!-- and so on... -->

**Expected behavior:** <!-- What should happen -->
**Expected behavioor:** <!-- What should happen -->

## Additional information

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Docker build

on:
pull_request:
branches: [ main ]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build with Docker
run: docker build .

18 changes: 9 additions & 9 deletions .github/workflows/ci.yml → .github/workflows/lint-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CI
name: Lint and build

on:
pull_request:
branches: [ main ]

jobs:
test:
lint-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -15,15 +15,15 @@ jobs:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: |
npm i
run: npm install
env:
CI: true
- name: Lint JavaScript and JSON files
run: |
npm run lint
- name: Lint files
run: npm run lint
env:
CI: true
- name: Build site
run: npm run build
env:
CI: true
- name: Build with Docker
run: docker build .

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
**/.DS_Store
node_modules
dist
_site
src/_data/assets.json
4 changes: 4 additions & 0 deletions .husky/commit-message
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no lint-staged
6 changes: 6 additions & 0 deletions .markdownlint-cli2.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use strict";

module.exports = {
config: require("./node_modules/markdownlint-config-fluid/.markdownlintrc.json"),
ignores: ["node_modules", "src/collections", "CHANGELOG.md"]
};
16 changes: 16 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict";

module.exports = {
extends: "stylelint-config-fluid",
plugins: ["stylelint-use-logical-spec"],
ignoreFiles: ["_site/**/*.css"],
rules: {
"custom-property-pattern": null,
"import-notation": "string",
"selector-class-pattern": null,
"liberty/use-logical-spec": [
"always",
{ except: ["float", "top", "left", "right", "bottom"] }
]
}
};
3 changes: 0 additions & 3 deletions .stylelintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ RUN npm run build

FROM nginx:1.18.0-alpine

COPY --from=builder /app/dist /usr/share/nginx/html
COPY --from=builder /app/_site /usr/share/nginx/html
Loading