Skip to content

Commit

Permalink
Merge branch 'release/1.4.1' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Dec 2, 2022
2 parents ff21ed1 + 2a0f4e4 commit 4ea8e1e
Show file tree
Hide file tree
Showing 21 changed files with 712 additions and 441 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Recipe Changelog

## 1.4.1 - 2022.12.01
### Changed
* Move to using `ServicesTrait` and add getter methods for services
* Switch to VitePress `^1.0.0-alpha.29` for the documentation
* Add `allow-plugins` to the `composer.json` to enable CI to work
* Wrap the fields in `<fieldset>` tags for semantic HTML & a11y
* Remove the odd Craft `modifiedAttributes` styling when a field value is changed ([#12403](https://github.com/craftcms/cms/issues/12403))

## 1.4.0 - 2021.10.05
### Added
* Added `.createRecipeMetaJsonLd()` to the Recipes field, to allow the creation of SEOmatic MetaJsonLd objects that can be manipulated and rendered on the page by SEOmatic
Expand Down
79 changes: 42 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
{
"name": "nystudio107/craft-recipe",
"description": "A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support",
"type": "craft-plugin",
"version": "1.4.0",
"keywords": [
"craft",
"cms",
"craftcms",
"craft-plugin",
"recipe"
],
"support": {
"docs": "https://nystudio107.com/plugins/recipe/documentation",
"issues": "https://nystudio107.com/plugins/recipe/support"
},
"license": "MIT",
"authors": [
{
"name": "nystudio107",
"homepage": "https://nystudio107.com"
}
],
"require": {
"craftcms/cms": "^3.0.0"
},
"autoload": {
"psr-4": {
"nystudio107\\recipe\\": "src/"
}
"name": "nystudio107/craft-recipe",
"description": "A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support",
"type": "craft-plugin",
"version": "1.4.1",
"keywords": [
"craft",
"cms",
"craftcms",
"craft-plugin",
"recipe"
],
"support": {
"docs": "https://nystudio107.com/docs/recipe/",
"issues": "https://nystudio107.com/plugins/recipe/support",
"source": "https://github.com/nystudio107/craft-recipe"
},
"license": "MIT",
"authors": [
{
"name": "nystudio107",
"homepage": "https://nystudio107.com"
}
],
"require": {
"craftcms/cms": "^3.0.0"
},
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true,
"yiisoft/yii2-composer": true
},
"extra": {
"name": "Recipe",
"handle": "recipe",
"schemaVersion": "1.0.0",
"hasCpSettings": true,
"hasCpSection": false,
"changelogUrl": "https://raw.githubusercontent.com/nystudio107/craft-recipe/v1/CHANGELOG.md",
"class": "nystudio107\\recipe\\Recipe"
"optimize-autoloader": true,
"sort-packages": true
},
"autoload": {
"psr-4": {
"nystudio107\\recipe\\": "src/"
}
},
"extra": {
"class": "nystudio107\\recipe\\Recipe",
"handle": "recipe",
"name": "Recipe"
}
}
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor
/node_modules
docs/.vitepress/dist
10 changes: 9 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,40 @@ DOCSDEST?=../../../sites/nystudio107/web/docs/recipe

.PHONY: docker build dev fix install lint clean npm

# Start the Docker container
docker:
docker build \
. \
-t ${CONTAINER}:${TAG} \
--build-arg TAG=${TAG} \
--no-cache
build: clean docker install
# Build the production docs
build: docker install
${DOCKERRUN} \
run docs:build
rm -rf ${DOCSDEST}
mv ./docs/.vitepress/dist ${DOCSDEST}
# Start up the dev server
dev: docker install
${DOCKERRUN} \
run docs:dev
# Fix the docs via textlint
fix: docker install
${DOCKERRUN} \
run docs:fix
# Run an npm install
install: docker
${DOCKERRUN} \
install
# Lint the docs via textlint
lint: docker install
${DOCKERRUN} \
run docs:lint
# Remove node_modules/* & package-lock.json
clean:
rm -rf node_modules/
rm -f package-lock.json
# Run the passed in npm command
npm: docker
${DOCKERRUN} \
$(filter-out $@,$(MAKECMDGOALS))
Expand Down
25 changes: 0 additions & 25 deletions docs/docs/.vitepress/config.js

This file was deleted.

38 changes: 38 additions & 0 deletions docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import {defineConfig} from 'vitepress'

export default defineConfig({
title: 'Recipe Plugin',
description: 'Documentation for the Recipe plugin',
base: '/docs/recipe/',
lang: 'en-US',
head: [
['meta', {content: 'https://github.com/nystudio107', property: 'og:see_also',}],
['meta', {content: 'https://twitter.com/nystudio107', property: 'og:see_also',}],
['meta', {content: 'https://youtube.com/nystudio107', property: 'og:see_also',}],
['meta', {content: 'https://www.facebook.com/newyorkstudio107', property: 'og:see_also',}],
],
themeConfig: {
socialLinks: [
{icon: 'github', link: 'https://github.com/nystudio107'},
{icon: 'twitter', link: 'https://twitter.com/nystudio107'},
],
logo: '/img/plugin-logo.svg',
editLink: {
pattern: 'https://github.com/nystudio107/craft-recipe/edit/develop/docs/docs/:path',
text: 'Edit this page on GitHub'
},
algolia: {
appId: 'ANVOBU7GYX',
apiKey: 'd9aa4fc31d67fba1d38915de67311070',
indexName: 'recipe'
},
lastUpdatedText: 'Last Updated',
sidebar: [],
nav: [
{text: 'Home', link: 'https://nystudio107.com/plugins/recipe'},
{text: 'Store', link: 'https://plugins.craftcms.com/recipe'},
{text: 'Changelog', link: 'https://nystudio107.com/plugins/recipe/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-recipe/issues'},
]
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@
target="_blank"
rel="noopener"
>
<img
src="/resources/img/nys-logo.svg"
<img
src="/img/nys-logo.svg"
aria-label="nystudio107 logo"
/>
/>
</a>
</div>
</template>

<script>
export default {
name: "SidebarBottom"
}
<script setup>
</script>

<style scoped>
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
.DocSearch {
--docsearch-primary-color: var(--c-brand) !important;
}

a > img {
display: inline-block;
}
42 changes: 0 additions & 42 deletions docs/docs/.vitepress/theme/index.js

This file was deleted.

42 changes: 42 additions & 0 deletions docs/docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import Theme from 'vitepress/theme'
import {h, watch} from 'vue'
import './custom.css'

import NYSLogo from './NYSLogo.vue';

// Could also come from .env
const GA_ID = 'UA-69117511-1';

export default {
...Theme,
Layout() {
return h(Theme.Layout, null, {
'aside-bottom': () => h(NYSLogo)
}
)
},
enhanceApp: (ctx) => {
// Google analytics integration
if (import.meta.env.PROD && GA_ID && typeof window !== 'undefined') {
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}
i[r].l = 1 * new Date()
a = s.createElement(o)
m = s.getElementsByTagName(o)[0]
a.async = 1
a.src = g
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga')
ga('create', GA_ID, 'auto')
ga('set', 'anonymizeIp', true)
// Send a page view any time the route changes
watch(ctx.router.route, (newValue, oldValue) => {
ga('set', 'page', newValue.path)
ga('send', 'pageview')
})
}
}
}
7 changes: 7 additions & 0 deletions docs/docs/@types/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module "*.vue" {
import Vue from 'vue';
export default Vue;
}

declare module 'rollup-plugin-sitemap';
declare module 'NYSLogo';
File renamed without changes
20 changes: 20 additions & 0 deletions docs/docs/public/img/plugin-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/docs/vite.config.js → docs/docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from 'vite'
import {defineConfig} from 'vite'
import SitemapPlugin from 'rollup-plugin-sitemap'
import VitePressConfig from './.vitepress/config.js'
import VitePressConfig from './.vitepress/config'

const docsSiteBaseUrl = 'https://nystudio107.com'
const docsBaseUrl = new URL(VitePressConfig.base, docsSiteBaseUrl).href.replace(/\/$/, '') + '/'
const docsBaseUrl = new URL(VitePressConfig.base!, docsSiteBaseUrl).href.replace(/\/$/, '') + '/'
const siteMapRoutes = [{
path: '',
name: VitePressConfig.title
Expand Down
Loading

0 comments on commit 4ea8e1e

Please sign in to comment.