Skip to content

Commit

Permalink
Merge branch 'release/1.1.1' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Sep 8, 2021
2 parents 97c024e + a642162 commit e0ec121
Show file tree
Hide file tree
Showing 21 changed files with 2,798 additions and 9,101 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Deploy Docs
env:
DOCS_DEST_DIR: /icalendar/
on:
push:
branches:
- v1
paths:
- 'docs/**'
pull_request:
branches:
- v1
paths:
- 'docs/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
strategy:
fail-fast: true
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run docs:build
- run: cp -vr docs/.vitepress/dist $GITHUB_WORKSPACE
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --delete
path: ./dist/
remote_path: ${{ secrets.NYS_DOCS_ROOT }}${{ env.DOCS_DEST_DIR }}
remote_host: ${{ secrets.NYS_DEPLOY_REMOTE_HOST }}
remote_port: ${{ secrets.NYS_DEPLOY_REMOTE_PORT }}
remote_user: ${{ secrets.NYS_DEPLOY_REMOTE_USER }}
remote_key: ${{ secrets.NYS_DEPLOY_PRIVATE_KEY }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# iCalendar Changelog

## 1.1.1 - 2021.09.08
### Fixed
* Decode any HTML entities in the rfc2545 filter ([#1](https://github.com/nystudio107/craft-icalendar/issues/1))
* Add `\r\n\t` to long lines that are split ([#1](https://github.com/nystudio107/craft-icalendar/issues/1))

## 1.1.0 - 2018.04.25
### Added
* Added `parseIcs` function to allow the parsing of `.ics` files
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-icalendar",
"description": "Tools for parsing & formatting the RFC 2445 iCalendar (.ics) specification",
"type": "craft-plugin",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"craft",
"cms",
Expand Down
8 changes: 8 additions & 0 deletions docs/.textlint.terms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
"Stylus",
"VuePress",
[
"front[- ]matter",
"frontmatter"
]
]
23 changes: 23 additions & 0 deletions docs/.textlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
rules: {
'@textlint-rule/no-unmatched-pair': true,
apostrophe: true,
'common-misspellings': true,
diacritics: true,
'en-capitalization': {
allowHeading: false
},
'stop-words': {
severity: 'warning'
},
terminology: {
terms: `${__dirname}/.textlint.terms.json`
},
'write-good': {
severity: 'warning'
}
},
filters: {
comments: true
}
}
8 changes: 8 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG TAG=14-alpine
FROM nystudio107/node-dev-base:$TAG

WORKDIR /app/

CMD ["run build"]

ENTRYPOINT ["npm"]
45 changes: 45 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
TAG?=14-alpine
CONTAINER?=$(shell basename $(dir $(CURDIR)))-docs
DOCKERRUN=docker container run \
--name ${CONTAINER} \
--rm \
-p 3002:3002 \
-t \
-v `pwd`:/app \
${CONTAINER}:${TAG}
DOCSDEST?=../../../sites/nystudio107/web/docs/icalendar

.PHONY: docker build dev fix install lint clean npm

docker:
docker build \
. \
-t ${CONTAINER}:${TAG} \
--build-arg TAG=${TAG} \
--no-cache
build: clean docker install
${DOCKERRUN} \
run docs:build
rm -rf ${DOCSDEST}
mv ./docs/.vitepress/dist ${DOCSDEST}
dev: docker install
${DOCKERRUN} \
run docs:dev
fix: docker install
${DOCKERRUN} \
run docs:fix
install: docker
${DOCKERRUN} \
install
lint: docker install
${DOCKERRUN} \
run docs:lint
clean: docker
rm -rf node_modules/
rm -f package-lock.json
npm: docker
${DOCKERRUN} \
$(filter-out $@,$(MAKECMDGOALS))
%:
@:
# ref: https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line
25 changes: 25 additions & 0 deletions docs/docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
title: 'iCalendar Plugin Documentation',
description: 'Documentation for the iCalendar plugin',
base: '/docs/icalendar/',
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: {
repo: 'nystudio107/craft-icalendar',
docsDir: 'docs/docs',
docsBranch: 'v1',
algolia: {
apiKey: '',
indexName: 'icalendar'
},
editLinks: true,
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
sidebar: 'auto',
},
};
37 changes: 37 additions & 0 deletions docs/docs/.vitepress/theme/SidebarBottom.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<div class="nys-footer">
<span>Brought to you by:</span>
<a
href="https://github.com/sponsors/khalwat"
target="_blank"
rel="noopener"
>
<img
src="/resources/img/nys-logo.svg"
aria-label="nystudio107 logo"
/>
</a>
</div>
</template>

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

<style scoped>
.nys-footer {
padding: 0 1.5rem 2rem;
font-size: 0.8rem;
}
.nys-footer img {
box-sizing: border-box;
max-width: 200px;
height: 80px;
display: block;
margin: 1rem 0;
padding-left: 0.7rem;
}
</style>
12 changes: 12 additions & 0 deletions docs/docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--c-brand: #48a391;
--c-brand-light: #5db7a5;
}

.custom-block.tip {
border-color: var(--c-brand-light);
}

.DocSearch {
--docsearch-primary-color: var(--c-brand) !important;
}
42 changes: 42 additions & 0 deletions docs/docs/.vitepress/theme/index.js
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 SidebarBottom from './SidebarBottom.vue';

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

export default {
...Theme,
Layout() {
return h(Theme.Layout, null, {
'sidebar-bottom': () => h(SidebarBottom)
}
)
},
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')
})
}
}
}
11 changes: 0 additions & 11 deletions docs/docs/.vuepress/config.js

This file was deleted.

16 changes: 10 additions & 6 deletions docs/docs/README.md → docs/docs/index.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: iCalendar plugin for Craft CMS 3.x
description: Documentation for the iCalendar plugin. iCalendar provides tools for parsing & formatting the RFC 2445 iCalendar (.ics) specification
---
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/badges/quality-score.png?b=v1)](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/?branch=v1) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/badges/coverage.png?b=v1)](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/?branch=v1) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/badges/build.png?b=v1)](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/build-status/v1) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-icalendar/badges/code-intelligence.svg?b=v1)](https://scrutinizer-ci.com/code-intelligence)

# iCalendar plugin for Craft CMS 3.x

Tools for parsing & formatting the RFC 2445 iCalendar (.ics) specification
Provides tools for parsing & formatting the RFC 2445 iCalendar (.ics) specification

![Screenshot](./resources/img/plugin-logo.png)

Expand Down Expand Up @@ -31,11 +35,11 @@ Or you can just install the plugin via the Craft CMS Plugin Store in the Control
iCalendar can read and parse RFC 2445 [iCalendar specification](https://icalendar.org/) `.ics` local & remote files, and allows you to query them for events.

iCalendar can also ensures that text conforms to the RFC 2445 [iCalendar specification](https://icalendar.org/) for `.ics` files. Specifically, it transforms text:
* to ensure the line endings are `\r\n` as opposed to Twig's default `\n`
* wrap long text to ensure that it is no more than 75 octets in length
* removes unnecessary whitespace
* strips all HTML tags from the text

* to ensure the line endings are `\r\n` as opposed to Twig's default `\n`
* wrap long text to ensure that it is no more than 75 octets in length
* removes unnecessary whitespace
* strips all HTML tags from the text

## Configuring iCalendar

Expand Down
1 change: 1 addition & 0 deletions docs/docs/resources/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.
26 changes: 26 additions & 0 deletions docs/docs/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from 'vite'
import SitemapPlugin from 'rollup-plugin-sitemap'
import VitePressConfig from './.vitepress/config.js'

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

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
SitemapPlugin({
baseUrl: docsBaseUrl,
contentBase: './docs/.vitepress/dist',
routes: siteMapRoutes,
})
],
server: {
host: '0.0.0.0',
port: 3002,
strictPort: true,
}
});
Loading

0 comments on commit e0ec121

Please sign in to comment.