Compare commits
9 Commits
3199835e83
...
v0.1.11
| Author | SHA1 | Date | |
|---|---|---|---|
| 27380290e1 | |||
| 7e44554767 | |||
| 9c3dceef84 | |||
| ba8d8e00a8 | |||
| 8f037b5950 | |||
| 291fa6eaa4 | |||
| 4079e4ecfb | |||
| eea020b136 | |||
| 5161bff624 |
@@ -3,4 +3,3 @@
|
||||
Headless WordPress project boilerplate using Nuxt.
|
||||
|
||||
[✨ Release notes](/wp-content/themes/moonshine/CHANGELOG.md)
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## v0.1.11
|
||||
|
||||
[compare changes](https://gitea.websimple.com/wp-sites/wp-headless/compare/v0.1.10...v0.1.11)
|
||||
|
||||
### 🚀 Enhancements
|
||||
|
||||
- MapSocialIcon (6dd13ea)
|
||||
- AcfSocial / parseAcfSocial (3199835)
|
||||
|
||||
### 🩹 Fixes
|
||||
|
||||
- Remove unneeded wrangler main / assets (eea020b)
|
||||
- Cloudflare image provider only in production (291fa6e)
|
||||
- Wrangler project name (8f037b5)
|
||||
- ENABLE_CLOUDFLARE_IMAGE (9c3dcee)
|
||||
|
||||
## v0.1.10
|
||||
|
||||
[compare changes](https://gitea.websimple.com/templates/wp-headless/compare/v0.1.9...v0.1.10)
|
||||
|
||||
@@ -6,7 +6,14 @@ Thème WordPress en headless basé sur Nuxt.
|
||||
|
||||
| Nom | Description | Exemple | Requise |
|
||||
|-----|-------------|---------|---------|
|
||||
| `NUXT_SESSION_PASSWORD` | Clé secrète pour l'authentification | `date \| md5sum` | ✅ |
|
||||
| `NUXT_WP_URL` | URL du backend WordPress | https://wp.exemple.com | ✅ |
|
||||
| `NUXT_SITE_URL` | URL du frontend Nuxt | https://www.example.com | ➖ |
|
||||
| `NUXT_SITE_ENV` | Environnement | staging \| production | ➖ |
|
||||
| `NUXT_SITE_URL` | URL du frontend Nuxt | https://www.example.com | ➖ |
|
||||
| `NUXT_WP_URL` | URL du backend WordPress | https://wp.exemple.com | ✅ |
|
||||
|
||||
## Secrets
|
||||
|
||||
Configurer les secrets nécessaires au projet:
|
||||
|
||||
```sh
|
||||
pnpm wrangler secret put NUXT_SESSION_PASSWORD
|
||||
```
|
||||
|
||||
@@ -12,7 +12,6 @@ defineProps<{ image?: AcfImageFragment }>();
|
||||
:width="image.mediaDetails?.width"
|
||||
:height="image.mediaDetails?.height"
|
||||
:style="{ objectPosition: image.objectPosition || 'center' }"
|
||||
format="avif,webp"
|
||||
placeholder
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,7 @@ const { data: siteOptions } = await useSiteOptions();
|
||||
<template>
|
||||
<footer class="bg-accented links:link-prose">
|
||||
<div class="container py-6">
|
||||
<AcfSocialProfiles :social="parseAcfSocial(siteOptions)" />
|
||||
<AcfSocial :social="parseAcfSocial(siteOptions)" />
|
||||
</div>
|
||||
<SiteFooterBottom />
|
||||
</footer>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { version } from "./package.json";
|
||||
|
||||
const isDev = process.env.NODE_ENV !== "production";
|
||||
|
||||
const siteUrl = process.env.NUXT_SITE_URL;
|
||||
if (!siteUrl) {
|
||||
throw new Error(`NUXT_SITE_URL is not defined. Make sure to set it in your build environment variables.`);
|
||||
@@ -13,6 +11,8 @@ if (!wpUrl) {
|
||||
}
|
||||
const wpDomain = new URL(wpUrl).hostname;
|
||||
|
||||
const enableCloudflareImage = Boolean(process.env.ENABLE_CLOUDFLARE_IMAGE);
|
||||
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
|
||||
@@ -60,10 +60,9 @@ export default defineNuxtConfig({
|
||||
nodeCompat: true,
|
||||
wrangler: {
|
||||
// Project name
|
||||
name: "moonshine",
|
||||
name: "wp-headless",
|
||||
// Cloudflare Workers settings
|
||||
compatibility_date: "2026-01-27",
|
||||
main: "./.output/server/index.mjs",
|
||||
observability: { enabled: true },
|
||||
preview_urls: false,
|
||||
// Environment variables
|
||||
@@ -72,11 +71,6 @@ export default defineNuxtConfig({
|
||||
NUXT_SITE_URL: siteUrl,
|
||||
NUXT_WP_URL: wpUrl,
|
||||
},
|
||||
// Bindings
|
||||
assets: {
|
||||
binding: "ASSETS",
|
||||
directory: "./.output/public/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -108,8 +102,10 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
image: {
|
||||
...isDev ? {} : { provider: "cloudflare", cloudflare: { baseURL: "/" } },
|
||||
provider: enableCloudflareImage ? "cloudflare" : "none",
|
||||
cloudflare: { baseURL: `${siteUrl}/` },
|
||||
domains: [wpDomain],
|
||||
format: ["avif", "webp"],
|
||||
},
|
||||
|
||||
robots: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@lewebsimple/moonshine",
|
||||
"description": "Headless WordPress theme based on Nuxt.",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"dev": "nuxt dev",
|
||||
"lint": "eslint --fix .",
|
||||
"postinstall": "nuxt prepare",
|
||||
"preview": "pnpm run build && wrangler dev --port 3000",
|
||||
"preview": "WRANGLER_ENV=dev pnpm run build && wrangler dev --port 3000",
|
||||
"release": "pnpm lint && changelogen --noAuthors --release --push",
|
||||
"typecheck": "nuxt typecheck"
|
||||
},
|
||||
|
||||
32
wp-content/themes/moonshine/pnpm-lock.yaml
generated
32
wp-content/themes/moonshine/pnpm-lock.yaml
generated
@@ -839,8 +839,8 @@ packages:
|
||||
resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@eslint/config-helpers@0.5.1':
|
||||
resolution: {integrity: sha512-QN8067dXsXAl9HIvqws7STEviheRFojX3zek5OpC84oBxDGqizW9731ByF/ASxqQihbWrVDdZXS+Ihnsckm9dg==}
|
||||
'@eslint/config-helpers@0.5.2':
|
||||
resolution: {integrity: sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==}
|
||||
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
|
||||
|
||||
'@eslint/config-inspector@1.4.2':
|
||||
@@ -853,8 +853,8 @@ packages:
|
||||
resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@eslint/core@1.0.1':
|
||||
resolution: {integrity: sha512-r18fEAj9uCk+VjzGt2thsbOmychS+4kxI14spVNibUO2vqKX7obOG+ymZljAwuPZl+S3clPGwCwTDtrdqTiY6Q==}
|
||||
'@eslint/core@1.1.0':
|
||||
resolution: {integrity: sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==}
|
||||
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
|
||||
|
||||
'@eslint/eslintrc@3.3.3':
|
||||
@@ -4084,8 +4084,8 @@ packages:
|
||||
resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
get-tsconfig@4.13.0:
|
||||
resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==}
|
||||
get-tsconfig@4.13.1:
|
||||
resolution: {integrity: sha512-EoY1N2xCn44xU6750Sx7OjOIT59FkmstNc3X6y5xpz7D5cBtZRe/3pSlTkDJgqsOk3WwZPkWfonhhUJfttQo3w==}
|
||||
|
||||
giget@2.0.0:
|
||||
resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==}
|
||||
@@ -5225,8 +5225,8 @@ packages:
|
||||
pkg-types@2.3.0:
|
||||
resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==}
|
||||
|
||||
playwright-core@1.58.0:
|
||||
resolution: {integrity: sha512-aaoB1RWrdNi3//rOeKuMiS65UCcgOVljU46At6eFcOFPFHWtd2weHRRow6z/n+Lec0Lvu0k9ZPKJSjPugikirw==}
|
||||
playwright-core@1.58.1:
|
||||
resolution: {integrity: sha512-bcWzOaTxcW+VOOGBCQgnaKToLJ65d6AqfLVKEWvexyS3AS6rbXl+xdpYRMGSRBClPvyj44njOWoxjNdL/H9UNg==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
@@ -7117,9 +7117,9 @@ snapshots:
|
||||
dependencies:
|
||||
'@eslint/core': 0.17.0
|
||||
|
||||
'@eslint/config-helpers@0.5.1':
|
||||
'@eslint/config-helpers@0.5.2':
|
||||
dependencies:
|
||||
'@eslint/core': 1.0.1
|
||||
'@eslint/core': 1.1.0
|
||||
|
||||
'@eslint/config-inspector@1.4.2(eslint@9.39.2(jiti@2.6.1))':
|
||||
dependencies:
|
||||
@@ -7140,7 +7140,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/json-schema': 7.0.15
|
||||
|
||||
'@eslint/core@1.0.1':
|
||||
'@eslint/core@1.1.0':
|
||||
dependencies:
|
||||
'@types/json-schema': 7.0.15
|
||||
|
||||
@@ -10503,12 +10503,12 @@ snapshots:
|
||||
|
||||
eslint-flat-config-utils@3.0.0:
|
||||
dependencies:
|
||||
'@eslint/config-helpers': 0.5.1
|
||||
'@eslint/config-helpers': 0.5.2
|
||||
pathe: 2.0.3
|
||||
|
||||
eslint-import-context@0.1.9(unrs-resolver@1.11.1):
|
||||
dependencies:
|
||||
get-tsconfig: 4.13.0
|
||||
get-tsconfig: 4.13.1
|
||||
stable-hash-x: 0.2.0
|
||||
optionalDependencies:
|
||||
unrs-resolver: 1.11.1
|
||||
@@ -10919,7 +10919,7 @@ snapshots:
|
||||
'@sec-ant/readable-stream': 0.4.1
|
||||
is-stream: 4.0.1
|
||||
|
||||
get-tsconfig@4.13.0:
|
||||
get-tsconfig@4.13.1:
|
||||
dependencies:
|
||||
resolve-pkg-maps: 1.0.0
|
||||
|
||||
@@ -11916,7 +11916,7 @@ snapshots:
|
||||
ohash: 2.0.11
|
||||
pathe: 2.0.3
|
||||
pkg-types: 2.3.0
|
||||
playwright-core: 1.58.0
|
||||
playwright-core: 1.58.1
|
||||
radix3: 1.1.2
|
||||
satori: 0.18.4
|
||||
satori-html: 0.3.2
|
||||
@@ -12397,7 +12397,7 @@ snapshots:
|
||||
exsolve: 1.0.8
|
||||
pathe: 2.0.3
|
||||
|
||||
playwright-core@1.58.0: {}
|
||||
playwright-core@1.58.1: {}
|
||||
|
||||
pluralize@8.0.0: {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user