diff --git a/.eslintignore b/.eslintignore index 4ed463fd..e0588c1a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ -.temp -.cache +temp +cache dist _site +!.vitepress diff --git a/.eslintrc.json b/.eslintrc.json index 332be138..db82a479 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -27,7 +27,7 @@ }], "require-jsdoc": ["error", { "require": { - "FunctionDeclaration": true, + "FunctionDeclaration": false, "MethodDefinition": false, "ClassDeclaration": false, "ArrowFunctionExpression": false, diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c3d33268..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -labels: bug ---- diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index fd01fa41..00000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: Other tasks -about: Basically everything else -labels: misc ---- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index af8af83f..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -labels: feature ---- diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index ddb943cd..33ffcdb2 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -9,9 +9,9 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 + - ubuntu-22.04 node-version: - - '16' + - '18' steps: # Install deps and cache - name: Checkout code @@ -20,14 +20,14 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: yarn - - name: Install Yarn dependencies - run: yarn install --prefer-offline --frozen-lockfile + cache: npm + - name: Install dependencies + run: npm clean-install --prefer-offline --frozen-lockfile # Run tests - name: Run linter - run: yarn lint + run: npm run lint - name: Run tests - run: yarn test + run: npm run test - name: Test build - run: yarn build + run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4422fc43..0512c66f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 + - ubuntu-22.04 node-version: - - '16' + - '18' # Install deps and cache steps: - name: Checkout code @@ -26,19 +26,19 @@ jobs: with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org - cache: yarn - - name: Install Yarn dependencies - run: yarn install --prefer-offline --frozen-lockfile + cache: npm + - name: Install dependencies + run: npm clean-install --prefer-offline --frozen-lockfile # Let's do tests rq just to make sure we dont push something that is fundamentally broken - name: Lint code - run: yarn lint + run: npm run lint - name: Run unit tests - run: yarn test + run: npm run test # Deploy to NPM - name: Prepare release - uses: lando/prepare-release-action@v2 + uses: lando/prepare-release-action@v3 - name: Deploy release to npm env: NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}} @@ -53,164 +53,119 @@ jobs: echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}@${{ env.PRERELEASE_TAG }}::This is a pre-release published to the '${{ env.PRERELEASE_TAG }}' npm tag" fi - auto-deploy: - runs-on: ${{ matrix.os }} - needs: deploy - env: - TERM: xterm - strategy: - fail-fast: false - matrix: - os: - - ubuntu-20.04 - node-version: - - '16' - auto-deploy-repos: - - name: lando/acquia - dirs: ./ - - name: lando/apache - dirs: ./ - - name: lando/backdrop - dirs: ./ - - name: lando/cli - dirs: ./ - - name: lando/compose - dirs: ./ - - name: lando/core - dirs: ./ - - name: lando/core-next - dirs: ./ - - name: lando/docs - dirs: ./ - - name: lando/dotnet - dirs: ./ - - name: lando/drupal - dirs: ./ - - name: lando/elasticsearch - dirs: ./ - - name: lando/go - dirs: ./ - - name: lando/joomla - dirs: ./ - - name: lando/lagoon - dirs: ./ - - name: lando/lamp - dirs: ./ - - name: lando/laravel - dirs: ./ - - name: lando/lemp - dirs: ./ - - name: lando/mailhog - dirs: ./ - - name: lando/mariadb - dirs: ./ - - name: lando/mean - dirs: ./ - - name: lando/memcached - dirs: ./ - - name: lando/mongo - dirs: ./ - - name: lando/mssql - dirs: ./ - - name: lando/mysql - dirs: ./ - - name: lando/nginx - dirs: ./ - - name: lando/node - dirs: ./ - - name: lando/pantheon - dirs: ./ - - name: lando/php - dirs: ./ - - name: lando/phpmyadmin - dirs: ./ - - name: lando/platformsh - dirs: ./ - - name: lando/postgres - dirs: ./ - - name: lando/python - dirs: ./ - - name: lando/redis - dirs: ./ - - name: lando/ruby - dirs: ./ - - name: lando/symfony - dirs: ./ - - name: lando/tomcat - dirs: ./ - - name: lando/solr - dirs: ./ - - name: lando/varnish - dirs: ./ - - name: lando/wordpress - dirs: ./ - steps: - # Install deps and cache - # NOTE that we use ref: main because we need to get the code that was updated from the prepare-release-action - - name: Checkout code - uses: actions/checkout@v3 - with: - ref: main - - name: Install node ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org - cache: yarn - - name: Install Yarn dependencies - run: yarn install --prefer-offline --frozen-lockfile + # auto-deploy: + # runs-on: ${{ matrix.os }} + # needs: deploy + # env: + # TERM: xterm + # strategy: + # fail-fast: false + # matrix: + # os: + # - ubuntu-22.04 + # node-version: + # - '18' + # auto-deploy-repos: + # - name: lando/acquia + # dirs: ./ + # - name: lando/apache + # dirs: ./ + # - name: lando/backdrop + # dirs: ./ + # - name: lando/cli + # dirs: ./ + # - name: lando/compose + # dirs: ./ + # - name: lando/core + # dirs: ./ + # - name: lando/core-next + # dirs: ./ + # - name: lando/docs + # dirs: ./ + # - name: lando/dotnet + # dirs: ./ + # - name: lando/drupal + # dirs: ./ + # - name: lando/elasticsearch + # dirs: ./ + # - name: lando/go + # dirs: ./ + # - name: lando/joomla + # dirs: ./ + # - name: lando/lagoon + # dirs: ./ + # - name: lando/lamp + # dirs: ./ + # - name: lando/laravel + # dirs: ./ + # - name: lando/lemp + # dirs: ./ + # - name: lando/mailhog + # dirs: ./ + # - name: lando/mariadb + # dirs: ./ + # - name: lando/mean + # dirs: ./ + # - name: lando/memcached + # dirs: ./ + # - name: lando/mongo + # dirs: ./ + # - name: lando/mssql + # dirs: ./ + # - name: lando/mysql + # dirs: ./ + # - name: lando/nginx + # dirs: ./ + # - name: lando/node + # dirs: ./ + # - name: lando/pantheon + # dirs: ./ + # - name: lando/php + # dirs: ./ + # - name: lando/phpmyadmin + # dirs: ./ + # - name: lando/platformsh + # dirs: ./ + # - name: lando/postgres + # dirs: ./ + # - name: lando/python + # dirs: ./ + # - name: lando/redis + # dirs: ./ + # - name: lando/ruby + # dirs: ./ + # - name: lando/symfony + # dirs: ./ + # - name: lando/tomcat + # dirs: ./ + # - name: lando/solr + # dirs: ./ + # - name: lando/varnish + # dirs: ./ + # - name: lando/wordpress + # dirs: ./ + # steps: + # # Install deps and cache + # # NOTE that we use ref: main because we need to get the code that was updated from the prepare-release-action + # - name: Checkout code + # uses: actions/checkout@v3 + # with: + # ref: main + # - name: Install node ${{ matrix.node-version }} + # uses: actions/setup-node@v3 + # with: + # node-version: ${{ matrix.node-version }} + # registry-url: https://registry.npmjs.org + # cache: npm + # - name: Install dependencies + # run: npm clean-install --prefer-offline --frozen-lockfile - # Auto deploy to everything else - - name: Auto deploy to ${{ matrix.auto-deploy-repos.name }} - uses: lando/auto-deploy-action@v2 - with: - branch: main - slug: ${{ matrix.auto-deploy-repos.name }} - token: ${{ secrets.PIROG_TOKEN }} - pr: false - dirs: ${{ matrix.auto-deploy-repos.dirs }} - - pr-deploy: - runs-on: ${{ matrix.os }} - needs: deploy - env: - TERM: xterm - strategy: - fail-fast: false - matrix: - os: - - ubuntu-20.04 - node-version: - - '16' - pr-deploy-repos: - - name: lando/blog - dirs: ./ - - name: lando/events - dirs: ./ - - name: lando/website - dirs: ./ - - steps: - # Install deps and cache - # NOTE that we use ref: main because we need to get the code that was updated from the prepare-release-action - - name: Checkout code - uses: actions/checkout@v3 - with: - ref: main - - name: Install node ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org - cache: yarn - - name: Install Yarn dependencies - run: yarn install --prefer-offline --frozen-lockfile - - # Auto deploy to everything else - - name: PR deploy to ${{ matrix.auto-deploy-repos.name }} - uses: lando/auto-deploy-action@v2 - with: - slug: ${{ matrix.pr-deploy-repos.name }} - token: ${{ secrets.PIROG_TOKEN }} - pr: true - dirs: ${{ matrix.pr-deploy-repos.dirs }} + # # Auto deploy to everything else + # - name: Auto deploy to ${{ matrix.auto-deploy-repos.name }} + # uses: lando/auto-deploy-action@v2 + # with: + # branch: main + # slug: ${{ matrix.auto-deploy-repos.name }} + # token: ${{ secrets.PIROG_TOKEN }} + # pr: false + # dirs: ${{ matrix.auto-deploy-repos.dirs }} diff --git a/.gitignore b/.gitignore index f78c372e..77e31004 100644 --- a/.gitignore +++ b/.gitignore @@ -75,8 +75,11 @@ typings/ # https://nextjs.org/blog/next-9-1#public-directory-support # public -# legacy vuepress build output and temp dirs +# legacy vitepress build output and temp dirs _site -docs/**/.vuepress/.temp -docs/**/.vuepress/.cache -docs/**/.vuepress/dist + +# vitepress thangs +docs/.vitepress/.temp +docs/.vitepress/cache +docs/.vitepress/dist +docs/.vitepress/config.js.timestamp-*-*.mjs diff --git a/.lando.yml b/.lando.yml index 1fb4092b..1a5ec23a 100644 --- a/.lando.yml +++ b/.lando.yml @@ -1,9 +1,9 @@ -name: vuepress-theme-default-plus +name: vitepress-theme-default-plus services: node: - type: node:14 + type: node:18 build: - - yarn install + - npm install scanner: false ssl: false sslExpose: false @@ -13,10 +13,10 @@ services: tooling: node: service: node - yarn: + npm: service: node dev: service: node - cmd: yarn dev --port 8071 + cmd: npm run dev --port 8071 env: DEBUG: "@lando/*" diff --git a/.node-version b/.node-version index b6a7d89c..3c032078 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -16 +18 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a7efe79..4a30e46c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,271 +1,3 @@ -## v1.0.0-beta.49 - [September 24, 2023](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.49) +## v1.0.0-beta.1 - [January 1, 2024](https://github.com/lando/vitepress-theme-default-plus/releases/tag/v1.0.0-alpha.1) -* Deploy release - -## v1.0.0-beta.48 - [September 24, 2023](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.48) - -* Added `alert` to `navbar` items. [Read More](https://vuepress-theme-default-plus.lando.dev/config.html#navbar) - -## v1.0.0-beta.47 - [August 8, 2023](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.47) - -* Added ability to disable config sets `sharedNavbar` by setting it to any non array value - -## v1.0.0-beta.46 - [June 16, 2023](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.46) - -* Switched release flow over to [@lando/prepare-release-action](https://github.com/lando/prepare-release-action) - -## v1.0.0-beta.45 - [May 16, 2023](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.45) - -* Update Algolia search app ID/api key. - -## v1.0.0-beta.44 - [December 6, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.44) - -* Meaningless release - -## v1.0.0-beta.43 - [December 6, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.43) - -* Fixed order of operations bug with new `satisfies` for `plugin-sidebar-header` and `plugin-versions-page` -* Improved config set merging to deeply clone - -## v1.0.0-beta.42 - [December 4, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.42) - -* Added `satisfies` to `plugin-versions-page` to target specific releases -* Added `plugin-alert` to easily set a site-wide alert message at the top of the page -* Added `type` to `plugin-sidebar-header` to set a custom class for the version badge - -## v1.0.0-beta.41 - [December 2, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.41) - -* Autodeploy release - -## v1.0.0-beta.40 - [December 2, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.40) - -* Added support for `columns` in `NavbarDropdown` subitems -* Added `satisfies` to `plugin-sidebar-header` to target specific releases - -## v1.0.0-beta.39 - [November 29, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.39) - -* Reverted requirement to `node >= 14` -* Updated to `vuepress@2.0.0-beta.53` -* Updated docs to reflect new usage - -## v1.0.0-beta.38 - [November 29, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.38) - -* Fixed bug loading `ReadMode.vue` when `readmode: false` - -## v1.0.0-beta.37 - [November 29, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.37) - -* Downstream deploy test - -## v1.0.0-beta.36 - [November 29, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.36) - -* Downstream deploy test - -## v1.0.0-beta.35 - [November 29, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.35) - -* Updated requirement to `node >= 16` -* Updated to `vuepress@2.0.0-beta.49` - -## v1.0.0-beta.34 - [May 5, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.34) - -* Fixed bug with default search plugin not using correct package name - -## v1.0.0-beta.33 - [May 5, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.33) - -* Bumped to stable release -* Reset devops - -## v1.0.0-beta.32 - [May 4, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.32) - -* Fixed bug with new `docsearch` package causing WSOD - -## v1.0.0-beta.31 - [May 4, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.31) - -* Updated to handle upsteam breaking changes in [vuepress@2.0.0-beta.40](https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md#200-beta40-2022-04-25) -* Bubbled up some parent `slots` for `Sidebar` and `Navbar` so they work correctly [#41](https://github.com/lando/vuepress-theme-default-plus/issues/41) - -## v1.0.0-beta.30 - [March 28, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.30) - -* Added `footer` and `page footer` slots to `Layout` -* Added custom containers for `thumbnail` and `caption` -* Made all core components swappable -* Fixed bug causing unified Algolia Docsearch to 404 when search item shares a path component with `base` -* Fixed styling of main content area when both `sidebar` and `rightbar` are disabled - -## v1.0.0-beta.29 [March 17, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.29)- - -* Added toggleable "Reading Mode" feature -* Added `BlogPost` as a new page type -* Added ability to easily add more "page types" -* Added new "highlight" custom container -* Added a simple "tagging" mechanism -* Added a job posting mechansim -* Improved `contributorsPage` and `contributors` so they can exclude items like bots -* Improved global and page-by-page component disabling so its more consistent -* Improved consistency of `border-radius` -* Fixed bug in `sitemp.xml` generation -* Fixed bug in `404` page causing a bad home link to show up - -## v1.0.0-beta.27 [March 13, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.27)- - -* Changed default `sidebarDepth` to `0` since `TOC` does the work now -* Fixed `lang` bug in `sitemp.xml` generation -* Improved edge handling of `TOC` marker - -## v1.0.0-beta.26 [March 12, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.26)- - -* Added fallback support for `frontmatter.description` with `frontmatter.summary` -* Added `toc` component to `rightbar` -* Added `robots.txt` support -* Added `sitemap.xml` support -* Elevated `Frontmatter` and `Custom Container` docs to the top level - -## v1.0.0-beta.24 [March 10, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.24)- - -* Refactored so things are less shitty PART 3 - -## v1.0.0-beta.23 [March 10, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.23)- - -* Refactored so things are less shitty PART 2 - -## v1.0.0-beta.22 [March 10, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.22)- - -* Refactored so things are less shitty - -## v1.0.0-beta.21 [March 7, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.21) - -* Empty release for deploy testing purposes - -## v1.0.0-beta.20 [March 7, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.20) - -* Empty release for deploy testing purposes - -## v1.0.0-beta.19 [March 7, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.19) - -* Empty release for deploy testing purposes - -## v1.0.0-beta.18 [February 28, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.18)- - -* Added support for Hubspot tracking code [#21](https://github.com/lando/vuepress-theme-default-plus/issues/21) - -## v1.0.0-beta.17 [February 26, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.17)- - -* Fixed bug causing `home` to `404` when deployed in `baseUrl` subsite configuration - -## v1.0.0-beta.16 [February 26, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.16)- - -* Added `half`, `third`, `center`, `left`, `right` and `card` custom containers -* Added `rightbar` option to `frontmatter`, works like `sidebar` but can disable `rightbar` -* Made `form` styling elements more consistent -* Fixed various styling bugs - -## v1.0.0-beta.15 [February 25, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.15)- - -* Removed unused components -* Updated the branding - -## v1.0.0-beta.14 [February 25, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.14)- - -* Added ability to override downstream `alias` in `themeConfig` -* Improved default `home` setting when running in `baseUrl` mode [#18](https://github.com/lando/vuepress-theme-default-plus/issues/18) - -## v1.0.0-beta.12 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.12)- - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.11 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.11)- - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.10 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.10)- - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.9 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.9) - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.8 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.8) - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.7 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.7) - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.6 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.6) - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.5 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.5) - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.4 [February 23, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.4) - -* Improved centering on `SidebarHeader` -* Removed background on `SocialLinks` for better dark mode transition -* Updated `lando` navbar defaults - -## v1.0.0-beta.3 [February 17, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.3) - -* Improved `sidebarHeader.icon` so it honors `base` -* Improved `social` and `sidebarHeader` styling for mobile -* Improved `
` stylings -* Fixed bug causing `lastUpdated` to not show up in `GuideHeader` -* Fixed bug causing Docsearch to not work correctly - -## v1.0.0-beta.2 [February 16, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.2) - -* Added undocumented setting to toggle on Lando docs "easy mode" -* Fixed bug causing `MailChimp` component to be offset in some contexts -* Fixed bug where `Help and Support` was named `Making a Guide 1` -* Fixed bug where theme defaults were not being merged into `themeConfig` correctly -* Fixed other bugs that are not even worth mentioning - -## v1.0.0-beta.1 [February 15, 2022](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v1.0.0-beta.1) - -* First beta with feature completeness (we think?). See [docs on docs](https://vuepress-theme-default-plus.lando.dev/). - -## v0.2.3 [November 8, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.2.3) - -* Adjust VuePress Dependencies - -## v0.2.2 [November 8, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.2.2) - -* Adjust VuePress Dependencies - -## v0.2.1 [November 8, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.2.1) - -* Move some VuePress plugins into prod dependencies - -## v0.2.0 [November 8, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.2.0) - -* Rename package - -## v0.1.2 [November 8, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.1.2) - -* Update Docs - -## v0.1.1 [November 8, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.1.1) - -* Fix Linting - -## v0.1.0 [November 5, 2021](https://github.com/lando/vuepress-theme-default-plus/releases/tag/v0.1.0) - -* Initial Release +* Migrated [@lando/vuepress-theme-default-plus](https://github.com/lando/vuepress-theme-default-plus) to [VitePress](https://vitepress.dev/) diff --git a/client.js b/client.js deleted file mode 100644 index 602001db..00000000 --- a/client.js +++ /dev/null @@ -1,8 +0,0 @@ -import {defineClientConfig} from '@vuepress/client'; - -import Layout from './layouts/Layout.vue'; -import NotFound from './layouts/NotFound.vue'; - -export default defineClientConfig({ - layouts: {NotFound, Layout}, -}); diff --git a/client/collections.data.js b/client/collections.data.js new file mode 100644 index 00000000..2f467674 --- /dev/null +++ b/client/collections.data.js @@ -0,0 +1,16 @@ + +import Debug from 'debug'; + +import {default as createContentLoader} from '../utils/create-content-loader'; + +const config = globalThis.VITEPRESS_CONFIG?.site?.themeConfig?.collections ?? {}; +const debug = Debug('@lando/collections.data.js'); // eslint-disable-line +const siteConfig = globalThis.VITEPRESS_CONFIG; + +const patterns = Object.entries(config) + .map(([type, config]) => config.patterns) + .flat(Number.POSITIVE_INFINITY); + +debug('loading collections data with patterns config %o', patterns); + +export default createContentLoader(patterns, {siteConfig}, {debug}); diff --git a/client/enhance-app-with-layouts.js b/client/enhance-app-with-layouts.js new file mode 100644 index 00000000..9396e0cd --- /dev/null +++ b/client/enhance-app-with-layouts.js @@ -0,0 +1,5 @@ +// DO NOT MODIFY THIS FILE!!! +// if you do it or you will break things +// it is automatically transformed by vite to statically include our layout imports +export default function(app) { +}; diff --git a/client/is-active.js b/client/is-active.js new file mode 100644 index 00000000..f4bbb87e --- /dev/null +++ b/client/is-active.js @@ -0,0 +1,19 @@ +const EXT_RE = /(index)?\.(md|html)$/; +const HASH_RE = /#.*$/; +const inBrowser = typeof document !== 'undefined'; +const normalize = path => decodeURI(path).replace(HASH_RE, '').replace(EXT_RE, ''); + +export default function(currentPath, matchPath, asRegex) { + if (matchPath === undefined) return false; + + currentPath = normalize(`/${currentPath}`); + + if (asRegex) return new RegExp(matchPath).test(currentPath); + if (normalize(matchPath) !== currentPath) return false; + + const hashMatch = matchPath.match(HASH_RE); + + if (hashMatch) return (inBrowser ? location.hash : '') === hashMatch[0]; + + return true; +}; diff --git a/client/team.data.js b/client/team.data.js new file mode 100644 index 00000000..cdd75078 --- /dev/null +++ b/client/team.data.js @@ -0,0 +1,17 @@ + +import Debug from 'debug'; + +import {default as getContributors} from '../utils/get-contributors'; + +const debug = Debug('@lando/team.data.js'); // eslint-disable-line +const siteConfig = globalThis.VITEPRESS_CONFIG; + +export default { + async load() { + const contributors = siteConfig?.userConfig?.themeConfig?.contributors ?? false; + const root = siteConfig?.userConfig?.gitRoot; + const team = contributors !== false ? await getContributors(root, contributors, {debug: debug.extend('get-contribs'), paths: []}) : []; + debug('loading team data %o', team); + return team; + }, +}; diff --git a/client/use-collection.js b/client/use-collection.js new file mode 100644 index 00000000..ce2c0540 --- /dev/null +++ b/client/use-collection.js @@ -0,0 +1,39 @@ +import {computed} from 'vue'; +import {useRoute} from 'vitepress'; +import {data as collections} from './collections.data'; + +export default function useCollection(type = undefined) { + const route = useRoute(); + const path = route.path; + + function findCurrentIndex() { + const result = pages.findIndex(p => p.url === route.path); + if (result === -1) console.error(`blog post missing: ${route.path}`); + return result; + } + + // filter pages if needed + const pages = type === undefined ? collections : collections.filter(page => page.type === type); + + // current + const page = computed(() => pages[findCurrentIndex()]); + + // prev page or loop back to end unless the end is me + const prevPage = computed(() => { + const prev = pages[findCurrentIndex() - 1] ?? pages[pages.length - 1]; + return prev.id !== page.value.id ? prev : undefined; + }); + // next page or loop back to beginning unless the beginning is me + const nextPage = computed(() => { + const next = pages[findCurrentIndex() + 1] ?? pages[0]; + return next.id !== page.value.id ? next : undefined; + }); + + // these are meant to replace the core next|prev nav links + const prevnext = computed(() => ({ + prev: prevPage.value ? {text: prevPage.value.title, link: prevPage.value.url} : undefined, + next: nextPage.value ? {text: nextPage.value.title, link: nextPage.value.url} : undefined, + })); + + return {pages, page, nextPage, prevnext, prevPage, path}; +} diff --git a/client/use-team.js b/client/use-team.js new file mode 100644 index 00000000..cbea4156 --- /dev/null +++ b/client/use-team.js @@ -0,0 +1,5 @@ +import {data as team} from './team.data'; + +export default function useTeam() { + return team; +} diff --git a/components/BlogHeader.vue b/components/BlogHeader.vue deleted file mode 100644 index 58a0f586..00000000 --- a/components/BlogHeader.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - diff --git a/components/BlogPost.vue b/components/BlogPost.vue deleted file mode 100644 index f31f6d41..00000000 --- a/components/BlogPost.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - - - diff --git a/components/CarbonAds.vue b/components/CarbonAds.vue deleted file mode 100644 index 6f05b643..00000000 --- a/components/CarbonAds.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - diff --git a/components/CustomNavbarBrand.vue b/components/CustomNavbarBrand.vue deleted file mode 100644 index ce2e334e..00000000 --- a/components/CustomNavbarBrand.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - diff --git a/components/CustomNavbarDropdown.vue b/components/CustomNavbarDropdown.vue deleted file mode 100644 index b31e3655..00000000 --- a/components/CustomNavbarDropdown.vue +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - diff --git a/components/CustomPageMeta.vue b/components/CustomPageMeta.vue deleted file mode 100644 index aa288e68..00000000 --- a/components/CustomPageMeta.vue +++ /dev/null @@ -1,202 +0,0 @@ - - - - - diff --git a/components/Guide.vue b/components/Guide.vue deleted file mode 100644 index 0cf96635..00000000 --- a/components/Guide.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - - diff --git a/components/GuideHeader.vue b/components/GuideHeader.vue deleted file mode 100644 index 52697416..00000000 --- a/components/GuideHeader.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - diff --git a/components/SocialLinks.vue b/components/SocialLinks.vue deleted file mode 100644 index f5473681..00000000 --- a/components/SocialLinks.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - diff --git a/components/TOC.vue b/components/TOC.vue deleted file mode 100644 index 7d03c7a6..00000000 --- a/components/TOC.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - - - diff --git a/components/VPLAlert.vue b/components/VPLAlert.vue new file mode 100644 index 00000000..b2d23e8e --- /dev/null +++ b/components/VPLAlert.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/components/VPLCats.vue b/components/VPLCats.vue new file mode 100644 index 00000000..610bff4c --- /dev/null +++ b/components/VPLCats.vue @@ -0,0 +1,60 @@ + + + + + + diff --git a/components/VPLCollectionHeader.vue b/components/VPLCollectionHeader.vue new file mode 100644 index 00000000..6e26122c --- /dev/null +++ b/components/VPLCollectionHeader.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/components/VPLCollectionIcon.vue b/components/VPLCollectionIcon.vue new file mode 100644 index 00000000..5c286e3c --- /dev/null +++ b/components/VPLCollectionIcon.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/components/VPLCollectionItem.vue b/components/VPLCollectionItem.vue new file mode 100644 index 00000000..6bc552a6 --- /dev/null +++ b/components/VPLCollectionItem.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/components/VPLCollectionItems.vue b/components/VPLCollectionItems.vue new file mode 100644 index 00000000..9e3926c1 --- /dev/null +++ b/components/VPLCollectionItems.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/components/VPLCollectionPage.vue b/components/VPLCollectionPage.vue new file mode 100644 index 00000000..32a6bf45 --- /dev/null +++ b/components/VPLCollectionPage.vue @@ -0,0 +1,72 @@ + + + diff --git a/components/VPLCollectionPageSection.vue b/components/VPLCollectionPageSection.vue new file mode 100644 index 00000000..8dcdcd09 --- /dev/null +++ b/components/VPLCollectionPageSection.vue @@ -0,0 +1,86 @@ + + + diff --git a/components/VPLCollectionPageTitle.vue b/components/VPLCollectionPageTitle.vue new file mode 100644 index 00000000..12ed8c0a --- /dev/null +++ b/components/VPLCollectionPageTitle.vue @@ -0,0 +1,69 @@ + + + diff --git a/components/VPLDocFooter.vue b/components/VPLDocFooter.vue new file mode 100644 index 00000000..d36ce3a0 --- /dev/null +++ b/components/VPLDocFooter.vue @@ -0,0 +1,287 @@ + + + + + + diff --git a/components/VPLDocFooterLastUpdated.vue b/components/VPLDocFooterLastUpdated.vue new file mode 100644 index 00000000..79e866be --- /dev/null +++ b/components/VPLDocFooterLastUpdated.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/components/VPLDogs.vue b/components/VPLDogs.vue new file mode 100644 index 00000000..610bff4c --- /dev/null +++ b/components/VPLDogs.vue @@ -0,0 +1,60 @@ + + + + + + diff --git a/global/Jobs.vue b/components/VPLJobs.vue similarity index 67% rename from global/Jobs.vue rename to components/VPLJobs.vue index a22da6a7..83995c4a 100644 --- a/global/Jobs.vue +++ b/components/VPLJobs.vue @@ -3,7 +3,12 @@ v-if="hasJobs" class="jobs" > - Jobs + + {{ props.title }} +
import {computed} from 'vue'; -import {useThemeData} from '@vuepress/plugin-theme-data/client'; +import {useData} from 'vitepress'; + +const props = defineProps({ + title: { + type: [String, Boolean], + default: 'Jobs', + }, +}); + +const {theme, frontmatter} = useData(); +const jobs = frontmatter.value.jobs ?? theme.value.jobs ?? []; -// Get theme data -const themeData = useThemeData(); -// Get relevant config from themedata -const {jobs} = themeData.value; // Compute whether we end up with any jobs or not -const hasJobs = computed(() => jobs.length > 0); +const hasJobs = computed(() => jobs !== false && jobs.length > 0); + + diff --git a/global/MailChimp.vue b/components/VPLMailChimp.vue similarity index 60% rename from global/MailChimp.vue rename to components/VPLMailChimp.vue index bfb2de97..77be4709 100644 --- a/global/MailChimp.vue +++ b/components/VPLMailChimp.vue @@ -51,14 +51,19 @@ value="" >
- + +
@@ -67,6 +72,8 @@ - diff --git a/components/VPLMenuLink.vue b/components/VPLMenuLink.vue new file mode 100644 index 00000000..80cd1880 --- /dev/null +++ b/components/VPLMenuLink.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/components/VPLNavBarMenuGroup.vue b/components/VPLNavBarMenuGroup.vue new file mode 100644 index 00000000..7c459435 --- /dev/null +++ b/components/VPLNavBarMenuGroup.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/components/VPLPostHeader.vue b/components/VPLPostHeader.vue new file mode 100644 index 00000000..ace1a796 --- /dev/null +++ b/components/VPLPostHeader.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/global/Sponsors.vue b/components/VPLSponsors.vue similarity index 62% rename from global/Sponsors.vue rename to components/VPLSponsors.vue index 86b69c19..4e563736 100644 --- a/global/Sponsors.vue +++ b/components/VPLSponsors.vue @@ -3,7 +3,12 @@ v-if="hasSponsors" class="sponsors" > - Sponsors + + {{ props.title }} +
-