Skip to content

Commit

Permalink
Merge branch 'release/1.0.11' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 12, 2023
2 parents dae33ba + 82fb5b2 commit 93a691b
Show file tree
Hide file tree
Showing 20 changed files with 1,444 additions and 1,061 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# FastCGI Cache Bust Changelog

## 1.0.10 - 2022.03.12
## 1.0.11 - 2023.01.12
### Changed
* Don't bust the cache if the element being saved is a draft or revision ([#37](https://github.com/nystudio107/craft-fastcgicachebust/issues/37))
* Now requires `craftcms/cms` `^3.2.0` or later
* Updated docs to use Vitepress `^1.0.0-alpha.29`
* Added `allow-plugins` to `composer.json` to fix CI

## 1.0.10 - 2022.03.12
### Added
* Added the ability to use environment variables and aliases in the **FastCGI Cache Path** setting ([#9](https://github.com/nystudio107/craft-fastcgicachebust/issues/9))
* Added `.gitattributes` & `CODEOWNERS`
Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-fastcgicachebust",
"description": "Bust the Nginx FastCGI Cache when entries are saved or created.",
"type": "craft-plugin",
"version": "1.0.10",
"version": "1.0.11",
"keywords": [
"craft",
"cms",
Expand All @@ -23,7 +23,15 @@
}
],
"require": {
"craftcms/cms": "^3.1.0"
"craftcms/cms": "^3.2.0"
},
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true,
"yiisoft/yii2-composer": true
},
"optimize-autoloader": true,
"sort-packages": true
},
"autoload": {
"psr-4": {
Expand Down
14 changes: 11 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,43 @@ DOCSDEST?=../../../sites/nystudio107/web/docs/fastcgi-cache-bust

.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
clean: docker
# 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))
$(filter-out $@,$(MAKECMDGOALS)) $(MAKEFLAGS)
%:
@:
# ref: https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line
26 changes: 0 additions & 26 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: 'FastCGI Cache Bust Plugin',
description: 'Documentation for the FastCGI Cache Bust plugin',
base: '/docs/fastcgi-cache-bust/',
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-fastcgicachebust/edit/develop-v3/docs/docs/:path',
text: 'Edit this page on GitHub'
},
algolia: {
appId: '3JUO5TO2MP',
apiKey: '21bdcc520664f952bfd3f25e5549f384',
indexName: 'nystudio107-fastcgi-cache-bust'
},
lastUpdatedText: 'Last Updated',
sidebar: [],
nav: [
{text: 'Home', link: 'https://nystudio107.com/plugins/fastcgi-cache-bust'},
{text: 'Store', link: 'https://plugins.craftcms.com/fastcgi-cache-bust'},
{text: 'Changelog', link: 'https://nystudio107.com/plugins/fastcgi-cache-bust/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-fastcgicachebust/issues'},
]
},
});
3 changes: 3 additions & 0 deletions docs/docs/.vitepress/dist/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url><loc>https://nystudio107.com/docs/fastcgi-cache-bust/</loc></url>
</urlset>
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';
1 change: 1 addition & 0 deletions docs/docs/public/img/nys-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 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 93a691b

Please sign in to comment.