Skip to content

Commit 99322d3

Browse files
authored
Merge pull request #42 from andybywire/web
Add web manifest and favicon
2 parents 9ce48d7 + 930e166 commit 99322d3

8 files changed

Lines changed: 3532 additions & 3669 deletions

File tree

.github/workflows/build-studio.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ on:
44
push:
55
paths:
66
- 'studio/**'
7-
workflow_dispatch:
7+
workflow_dispatch:
8+
repository_dispatch:
89

910
jobs:
1011
build-and-deploy:
1112
name: Build & Deploy Sanity Studio
12-
if: ${{ github.ref == 'refs/heads/studio-v3' }}
13+
if: ${{ github.ref == 'refs/heads/studio' }}
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout Code
@@ -28,6 +29,10 @@ jobs:
2829
run: npx sanity build --no-auto-updates
2930
working-directory: studio
3031

32+
- name: Extract Studio Manifest
33+
run: npx sanity manifest extract --output studio/dist/static
34+
working-directory: studio
35+
3136
- name: Set Up SSH
3237
run: |
3338
mkdir -p ~/.ssh/

package-lock.json

Lines changed: 3489 additions & 3657 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

studio/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
"sanity"
1515
],
1616
"dependencies": {
17+
"@sanity/assist": "^4.0.1",
18+
"@sanity/embeddings-index-ui": "^2.0.1",
1719
"@sanity/vision": "^3.72.1",
1820
"@types/react-dom": "^19.0.4",
1921
"react": "^18.3.1",
2022
"react-dom": "^18.3.1",
2123
"react-icons": "^5.4.0",
2224
"react-is": "^19.0.0",
23-
"sanity": "^3.72.1",
24-
"sanity-plugin-taxonomy-manager": "^3.2.6",
25+
"sanity": "^3.85.1",
26+
"sanity-plugin-taxonomy-manager": "^3.3.0",
2527
"styled-components": "^6.1.8"
2628
},
2729
"devDependencies": {

studio/sanity.config.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type {StructureBuilder} from 'sanity/structure'
66
import {visionTool} from '@sanity/vision'
77
import {taxonomyManager} from 'sanity-plugin-taxonomy-manager'
88
import {schemaTypes} from './schemaTypes'
9+
import {embeddingsIndexDashboard} from '@sanity/embeddings-index-ui'
10+
import { assist } from '@sanity/assist'
11+
912
// import {disciplineTemplate} from '../web/_src/discipline_js.11ty.js'
1013

1114
const hiddenDocTypes = (listItem: any) =>
@@ -60,16 +63,11 @@ export default defineConfig({
6063
taxonomyManager({
6164
baseUri: 'https://uxmethods.org/',
6265
}),
66+
embeddingsIndexDashboard(),
67+
assist(),
6368
],
6469

6570
schema: {
6671
types: schemaTypes,
6772
},
68-
document: {
69-
comments: {
70-
enabled: false,
71-
},
72-
},
73-
tasks: {enabled: false},
74-
scheduledPublishing: {enabled: false},
7573
})

studio/schemaTypes/objects/heroImage.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export default defineType({
66
title: 'Image',
77
options: {
88
hotspot: true,
9+
aiAssist: {
10+
imageDescriptionField: 'alt',
11+
},
912
},
1013
fields: [
1114
defineField({
@@ -15,10 +18,11 @@ export default defineType({
1518
}),
1619
defineField({
1720
name: 'alt',
18-
type: 'string',
21+
type: 'text',
1922
title: 'Alternative text',
2023
description:
2124
'Alternative (Alt) Text communicates the meaning of a non-decorative image relative to its document context. Leave blank for decorative images.',
25+
rows: 2,
2226
}),
2327
],
2428
preview: {

web/.eleventy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default function (eleventyConfig) {
1414
eleventyConfig.addPassthroughCopy({'_src/style': 'style'})
1515
eleventyConfig.addPassthroughCopy({'_src/js': 'js'})
1616
eleventyConfig.addPassthroughCopy({'_includes/icons': 'icons'})
17+
eleventyConfig.addPassthroughCopy({'_includes/manifest.json': 'manifest.json'})
1718
eleventyConfig.addPassthroughCopy({'_src/assets': 'assets'}) // If you have other assets
1819

1920
// Filters

web/_includes/manifest.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"lang": "en",
3+
"name": "UX Methods",
4+
"short_name": "UX Methods",
5+
"description": "UX Methods is a community powered, linked data driven knowledge graph for learning about the techniques of user experience design.",
6+
"theme_color": "#182125",
7+
"background_color": "#28B7FF",
8+
"display": "standalone",
9+
"start_url": "/index.html",
10+
"icons": [
11+
{
12+
"src": "icons/pwa_icon.png",
13+
"sizes": "72x72",
14+
"type": "image/png"
15+
}
16+
]
17+
}

web/_includes/partials/head.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<head>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
<meta name="theme-color" content="#182125">
5+
<link rel="manifest" href="/manifest.json"/>
46
<link rel="stylesheet" href="/style/global.css">
7+
<link rel="icon" type="image/png" sizes="72x72" href="/icons/favicon.png">
8+
59
<title>UX Methods V2 {{ title | prependPipe if title }}{{ resource.title | prependPipe if resource.title}}</title>
610

711
</title>

0 commit comments

Comments
 (0)