diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 17021eb5..65082ad9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -4,8 +4,8 @@ contact_links: url: https://iles-docs.netlify.app/faqs/troubleshooting about: 'Please check the most common configuration problems before opening an issue.' - name: Discord Chat - url: https://discord.com/channels/804011606160703521/900707742203920394 - about: 'Discuss with other users in the #iles channel of the Vite.js Discord server.' + url: https://discord.gg/p7rXjFcwXa + about: 'Discuss with other users in the #iles channel of the îles Discord server.' - name: Questions & Discussions url: https://github.com/ElMassimo/iles/discussions about: Use GitHub discussions for questions and discussions. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4159bb48..53f2f3e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,6 +35,12 @@ jobs: - name: Build run: pnpm build:all + - name: Build Docs Site + run: pnpm docs:build + + - name: Build Blog Site + run: pnpm blog:build + - name: Tests run: pnpm test @@ -54,7 +60,7 @@ jobs: CI: true runs-on: ubuntu-latest - container: cypress/included:9.2.0 + container: cypress/included:13.13.2 steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index d45d8020..00986ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ dist/ *.tgz .pnpm-debug.log packages/.pnpm-debug.log +auto-imports.d.ts components.d.ts composables.d.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 992477fb..5441116e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "typescript.tsdk": "node_modules/typescript/lib", + "prettier.enable": false, "files.exclude": { "**/dist": true }, diff --git a/README.md b/README.md index 83255c14..a9e51b82 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ [blog]: https://the-vue-point-with-iles.netlify.app/ -[partial hydration]: https://iles-docs.netlify.app/guide/hydration -[Batteries Included]: https://iles-docs.netlify.app/guide/development#components +[partial hydration]: https://iles-docs.netlify.app/guide/islands +[Batteries Included]: https://iles-docs.netlify.app/guide/project-structure#components [Multi-Framework]: https://iles-docs.netlify.app/guide/frameworks [markdown]: https://iles-docs.netlify.app/guide/markdown [routing]: https://iles-docs.netlify.app/guide/routing @@ -96,5 +96,5 @@ Visit the [documentation website][docs] to check out the [guides][guide] and sea [VitePress]: https://vitepress.vuejs.org/ [vite-ssg]: https://github.com/antfu/vite-ssg [vue-router]: https://next.router.vuejs.org/ -[@unhead/vue]: https://github.com/unjs/unhead +[@unhead/vue]: https://unhead.unjs.io/ diff --git a/docs/.gitignore b/docs/.gitignore index b2e95add..e6ac361b 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -6,3 +6,19 @@ cypress/screenshots # Algolia .algolia.env + +# Pinegrow +_pgbackup +_pginfo + +## optional +# pinegrow.json + +## optional +## Uncomment the below as per your needs +## add any d.ts files that are auto-generated, for eg, +auto-imports.d.ts +components.d.ts +composables.d.ts +## rollup visualizer +stats.html \ No newline at end of file diff --git a/docs/composables.d.ts b/docs/composables.d.ts deleted file mode 100644 index 4bc082a8..00000000 --- a/docs/composables.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// generated by iles -// We suggest you to commit this file into source control - -declare global { - const definePageComponent: typeof import('iles')['definePageComponent'] - const useDocuments: typeof import('iles')['useDocuments'] - const useHead: typeof import('iles')['useHead'] - const usePage: typeof import('iles')['usePage'] - const useRoute: typeof import('iles')['useRoute'] -} - -export { } diff --git a/docs/cypress/e2e/sidebar.cypress.cy.js b/docs/cypress/e2e/sidebar.cypress.cy.js index 49ef9361..60e338d8 100644 --- a/docs/cypress/e2e/sidebar.cypress.cy.js +++ b/docs/cypress/e2e/sidebar.cypress.cy.js @@ -1,4 +1,4 @@ -import { visit, navigateTo, goBackHome, assertPage, waitForHydration } from './helpers' +import { visit, visitHome, navigateTo, goBackHome, assertPage, waitForHydration } from './helpers' describe('Sidebar Toggle', () => { const sidebar = () => @@ -24,23 +24,26 @@ describe('Sidebar Toggle', () => { sidebarToggle().should('not.be.visible') }) - test.skipIf(process.env.CI)('can open in mobile', () => { - visitHome() - cy.viewport(500, 720) - visit('/guide/frameworks') - openSidebar() - closeSidebar() - - // Ensure Turbo reactivates the islands. - openSidebar() - sidebar().contains('Config').click() - - // Give Turbo time to replace the body. - waitForHydration() - assertPage({ title: 'Config' }) - sidebar().should('not.be.visible') - - openSidebar() - closeSidebar() + it('can open in mobile', () => { + cy.skipIf(process.env.CI) + it('can open in mobile', () => { + visitHome() + cy.viewport(500, 720) + visit('/guide/frameworks') + openSidebar() + closeSidebar() + + // Ensure Turbo reactivates the islands. + openSidebar() + sidebar().contains('Config').click() + + // Give Turbo time to replace the body. + waitForHydration() + assertPage({ title: 'Config' }) + sidebar().should('not.be.visible') + + openSidebar() + closeSidebar() + }) }) }) diff --git a/docs/cypress/support/commands.js b/docs/cypress/support/commands.js index 119ab03f..6f99f1c3 100644 --- a/docs/cypress/support/commands.js +++ b/docs/cypress/support/commands.js @@ -23,3 +23,10 @@ // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) + +Cypress.Commands.add( + 'skipIf', + (expression) => { + if (expression) context.skip.bind(context)(); + } +); \ No newline at end of file diff --git a/docs/icons/nuxt.svg b/docs/icons/nuxt.svg new file mode 100644 index 00000000..ff4336ab --- /dev/null +++ b/docs/icons/nuxt.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/iles.config.ts b/docs/iles.config.ts index 764fbe80..d9a00481 100644 --- a/docs/iles.config.ts +++ b/docs/iles.config.ts @@ -5,6 +5,7 @@ import headings from '@islands/headings' import icons from '@islands/icons' import prism from '@islands/prism' import pwa from '@islands/pwa' +import excerpt from '@islands/excerpt' import reactivityTransform from '@vue-macros/reactivity-transform/vite' import UnoCSS from 'unocss/vite' @@ -16,6 +17,13 @@ const { title, description } = site export default defineConfig({ siteUrl: 'https://iles-docs.netlify.app', + + extendFrontmatter(frontmatter, filename) { + if (filename.includes('/recipes/') && !filename.includes('/recipes/index.vue')) { + frontmatter.layout = 'recipe' + } + }, + turbo: true, jsx: 'preact', debug: false, @@ -23,6 +31,7 @@ export default defineConfig({ headings(), icons(), prism(), + excerpt({ maxLength: 140 }), lastUpdated(), pwa({ manifestFilename: 'pwa-manifest.json', @@ -59,11 +68,27 @@ export default defineConfig({ ], markdown: { rehypePlugins: [ - 'rehype-external-links', + [ + 'rehype-external-links', + { + target: '_blank', + rel: ['noopener'], + test: (node: any) => /^https?:\/\//.test(node.properties.href), + }, + ], + ], + }, + autoImport: { + imports: [ + '@vueuse/core', // auto-import composables from library + ], + dirs: [ + // 'src/composables', // already added by Îles + 'src/logic', // auto-import composables from `src/logic` folder ], }, ssg: { - manualChunks (id, api) { + manualChunks(id, api) { if (id.includes('preact') || id.includes('algolia') || id.toLowerCase().includes('docsearch')) return 'docsearch' }, diff --git a/docs/package.json b/docs/package.json index 45a82231..cd204707 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@iconify-json/bx": "^1.1.10", "@iconify-json/heroicons-outline": "^1.1.10", + "@islands/excerpt": "workspace:*", "@islands/headings": "workspace:*", "@islands/icons": "workspace:*", "@islands/prism": "workspace:*", diff --git a/docs/public/_redirects b/docs/public/_redirects index f0ee1c3b..c8f019ce 100644 --- a/docs/public/_redirects +++ b/docs/public/_redirects @@ -1,2 +1,8 @@ -/config/plugins https://iles-docs.netlify.app/guide/plugins 301 /guide/comparisons https://iles-docs.netlify.app/faqs 301 +/guide/client-scripts https://iles-docs.netlify.app/guide/hydration#client-script-block 301 +/config/plugins https://iles-docs.netlify.app/guide/modules 301 +/config#your-app https://iles-docs.netlify.app/guide/project-structure#app-2 301 +/guide/development https://iles-docs.netlify.app/guide/project-structure 301 +/guide/meta-tags https://iles-docs.netlify.app/guide/head-and-meta 301 +/guide/hydration https://iles-docs.netlify.app/guide/islands 301 +/guide/plugins https://iles-docs.netlify.app/guide/modules 301 \ No newline at end of file diff --git a/docs/scripts/test-cypress b/docs/scripts/test-cypress index 55d52a36..4d3bb765 100755 --- a/docs/scripts/test-cypress +++ b/docs/scripts/test-cypress @@ -8,8 +8,8 @@ echo '== Starting server ==' pnpm run preview & echo '== Waiting for server to respond... ==' -pnpx wait-on http-get://localhost:3050 --delay 1000 --timeout 15000 +pnpx wait-on http-get://[::1]:3050 --delay 1000 --timeout 15000 echo '== Server ready! ==' -pnpx cypress@10.6.0 run && echo '== Finished! ==' +pnpx cypress@13.13.2 run && echo '== Finished! ==' diff --git a/docs/src/assets/recipes/a-simple-iles-app/home-page.jpg b/docs/src/assets/recipes/a-simple-iles-app/home-page.jpg new file mode 100644 index 00000000..895b8255 --- /dev/null +++ b/docs/src/assets/recipes/a-simple-iles-app/home-page.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:171f8b1128a50f42f605f5151f7c13342082608908c9ab103459ff95b6662647 +size 113626 diff --git a/docs/src/assets/recipes/a-simple-iles-app/iles-build.jpg b/docs/src/assets/recipes/a-simple-iles-app/iles-build.jpg new file mode 100644 index 00000000..1b8ba49a --- /dev/null +++ b/docs/src/assets/recipes/a-simple-iles-app/iles-build.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bffe3eebd1b8ee57a521d75d10977f3e7dc6c970aa14d8c8997b10b19e080d9 +size 412121 diff --git a/docs/src/assets/recipes/vanilla-vue-to-iles/iles-build.jpg b/docs/src/assets/recipes/vanilla-vue-to-iles/iles-build.jpg new file mode 100644 index 00000000..4a3b933d --- /dev/null +++ b/docs/src/assets/recipes/vanilla-vue-to-iles/iles-build.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbd95cfa4259d4c352e868472d8a63516e4130c6947523ec1d51931911815d2d +size 700450 diff --git a/docs/src/assets/recipes/vanilla-vue-to-iles/netlify-drop.jpg b/docs/src/assets/recipes/vanilla-vue-to-iles/netlify-drop.jpg new file mode 100644 index 00000000..646073f1 --- /dev/null +++ b/docs/src/assets/recipes/vanilla-vue-to-iles/netlify-drop.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bbed815a09aeb29e7c20351a8bb31d48377f3c687458c564aaea7458812b237 +size 542988 diff --git a/docs/src/assets/recipes/vanilla-vue-to-iles/netlify-preview.jpg b/docs/src/assets/recipes/vanilla-vue-to-iles/netlify-preview.jpg new file mode 100644 index 00000000..6aa8cfde --- /dev/null +++ b/docs/src/assets/recipes/vanilla-vue-to-iles/netlify-preview.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:279657e8885f175916642dca60440b1da4c63d4fa8753910f48ea07cdbdcac74 +size 496311 diff --git a/docs/src/assets/recipes/vanilla-vue-to-iles/vanilla-vue.jpg b/docs/src/assets/recipes/vanilla-vue-to-iles/vanilla-vue.jpg new file mode 100644 index 00000000..98dd8e4e --- /dev/null +++ b/docs/src/assets/recipes/vanilla-vue-to-iles/vanilla-vue.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee152bb2247906812853f8140c9651a1fed77519c8eb8ae2aad9ccaa03d2402a +size 106137 diff --git a/docs/src/components/AutoImported.vue b/docs/src/components/AutoImported.vue index a049e06f..c3e42410 100644 --- a/docs/src/components/AutoImported.vue +++ b/docs/src/components/AutoImported.vue @@ -1,5 +1,5 @@ diff --git a/docs/src/components/DarkModeSwitch.vue b/docs/src/components/DarkModeSwitch.vue index f39f2c58..2b4fdd31 100644 --- a/docs/src/components/DarkModeSwitch.vue +++ b/docs/src/components/DarkModeSwitch.vue @@ -1,7 +1,3 @@ - -