From d6f3e427d8552380ce4f21017f61d73107c836e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Wed, 11 Oct 2023 17:01:10 -0300 Subject: [PATCH 1/8] Update taxa_page.yml.example --- config/taxa_page.yml.example | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/config/taxa_page.yml.example b/config/taxa_page.yml.example index 18b44c7..2000e13 100644 --- a/config/taxa_page.yml.example +++ b/config/taxa_page.yml.example @@ -1,12 +1,13 @@ -taxa_page_overview: - panels: - - - - panel:gallery - - panel:type - - panel:type-specimen - - panel:nomenclature - - panel:nomenclature-references +taxa_page: + overview: + panels: + - - - panel:gallery + - panel:type + - panel:type-specimen + - panel:nomenclature + - panel:nomenclature-references - - - panel:map - - panel:descendants - - panel:content - - panel:statistics + - - panel:map + - panel:descendants + - panel:content + - panel:statistics From c972e419f793cc8340f862ce24005f4637513b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Wed, 11 Oct 2023 17:50:35 -0300 Subject: [PATCH 2/8] Update README.md --- README.md | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 070e094..2062bef 100644 --- a/README.md +++ b/README.md @@ -46,15 +46,16 @@ But if you don't want to fork it, you can clone directly from this git clone https://github.com/SpeciesFileGroup/taxonpages.git ``` -3. Go to `taxonpages` folder and switch to `main` branch +3. Go to `taxonpages` folder and enter the following commands to copy the software to your `setup` branch ``` -cd taxonpages git checkout main +git checkout setup +git checkout main . +git reset +git checkout . ``` -4. [Download](https://github.com/SpeciesFileGroup/taxonpages/archive/refs/heads/setup.zip) configuration branch and paste `config` and `pages` folders inside taxonpages folder. - 5. Setup `config/api.yml` with the API server configuration 6. Install node dependencies @@ -162,25 +163,34 @@ const { project_name } = __APP_ENV__ const projectName = __APP_ENV__.project_name ``` -## Panels -### Panel layout +## Taxa Page -To modify the position of the panels in the layout of the Taxa page, edit the `taxa_page.yml` file +### Layout -```yaml -taxa_page_overview: - panels: - - - - panel:gallery - - panel:type - - panel:type-specimen - - panel:nomenclature - - panel:nomenclature-references +To modify the position of the panels in the layout of the Taxa page, edit the `taxa_page.yml` file. There you can add/move/remove panels from the layout, also you can add new tabs and include new panels there. If you want to make some tabs visible or not depending the rank group, you can include `rankGroup` - - - panel:map - - panel:descendants - - panel:content - - panel:statistics +```yaml +taxa_page: + overview: + panels: + - - - panel:gallery + - panel:type + - panel:type-specimen + - panel:nomenclature + - panel:nomenclature-references + + - - panel:map + - panel:descendants + - panel:content + - panel:statistics +# +# An example of a new tab: +# +# type_specimens: +# rank_group: ['SpeciesGroup'] +# panels: +# - - - panel:specimen-records ``` ### External panels @@ -195,7 +205,7 @@ import MyPanelComponent from './MyPanelComponent.vue' Export default { id: 'panel:test', // ID to identify this panel component: MyPanelComponent, // Vue component for your panel - available: ['HigherClassificationGroup', 'FamilyGroup', 'GenusGroup', 'SpeciesGroup'] // <-- OPTIONAL: This will define for which rank group will be available, remove it if your panel will be available for all. + rankGroup: ['HigherClassificationGroup', 'FamilyGroup', 'GenusGroup', 'SpeciesGroup'] // <-- OPTIONAL: This will define for which rank group will be available, remove it if your panel will be available for all. } ``` From 261d10410ee53bafa16b606a7c91306439faa959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Wed, 20 Mar 2024 17:47:02 -0300 Subject: [PATCH 3/8] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b4bc43f..a352c4e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ !config !config/** !public +!public/** !README.md -config/**/*.development.yml \ No newline at end of file +config/**/*.development.yml From c2d2eb9078bf5d302f57c2b4be24ca427e44b375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Wed, 19 Jun 2024 15:31:47 -0300 Subject: [PATCH 4/8] Create dependabot.yml --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..da40ae3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'daily' + open-pull-requests-limit: 0 + target-branch: 'development' From 9bda346dc789a2458d4de36b812aeea056a7470b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Thu, 27 Jun 2024 18:05:07 -0300 Subject: [PATCH 5/8] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 2062bef..2d533e3 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,22 @@ taxa_page: # - - - panel:specimen-records ``` +### Lifecycle hooks (Experimental feature) + +The `onCreatePage` and `onSSRPageCreate` functions allow you to execute code at the time the taxa page is created. `onSSRPageCreate` will be executed only on the server side in SSR mode. To make use of them it is necessary to include them in a file object called `pages/otus.config.js`. Both functions accept `otu`, `taxon`, `route` and `router` objects as parameters. Since `onCreatePage` runs on Taxa page component, it is possible to use hooks like `onMounted` or `onBeforeMount` inside it + +```javascript +export default { + onSSRCreatePage: async ({ otu, taxon, route, router }) => { + // Your code here + }, + + onCreatePage: ({ otu, taxon, route, router }) => { + // Your code here + } +} +``` + ### External panels To add panels in Taxa pages, create a folder called `panels` in your `setup` branch, and inside it create another folder for your panel. For example: `panels/PanelTest` From 04e633915b54edf034862cdd9046d54ec4e1f53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Tue, 15 Oct 2024 18:18:40 -0300 Subject: [PATCH 6/8] Update and rename gh-pages.yml to deploy.yml --- .../workflows/{gh-pages.yml => deploy.yml} | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) rename .github/workflows/{gh-pages.yml => deploy.yml} (57%) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/deploy.yml similarity index 57% rename from .github/workflows/gh-pages.yml rename to .github/workflows/deploy.yml index 7382d05..689fe1f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/deploy.yml @@ -1,21 +1,22 @@ -name: public-build +name: Deploy to GitHub Pages on: push: - branches: [main, setup] + branches: + - main + - setup workflow_dispatch: jobs: build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: 'main' fetch-depth: 0 - - - uses: actions/checkout@v2 + + - uses: actions/checkout@v4 with: ref: 'setup' fetch-depth: 0 @@ -25,32 +26,44 @@ jobs: run: cp -r _setup/* . - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: '16' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 id: npm-cache with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- + - name: Install dependencies run: npm ci - name: Build public view run: npm run build - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - target_branch: gh-pages - build_dir: dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + path: ./dist + + deploy: + needs: build + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 permissions: contents: write - From 966f85bba1043adade987508248fde543345ce5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Tue, 15 Oct 2024 18:36:55 -0300 Subject: [PATCH 7/8] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d533e3..aed85aa 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,10 @@ TaxonPages software is in active development and changes are expected that will 1. Click on "Fork" button to create your own repository from this. 2. Uncheck `Copy the setup branch only` and press `Save` -3. After create your repo, go to `Settings > Pages`, on "Branch" select `gh-pages` and `/(root)`. Then press save -4. Open `router.yml` file and change `base_url` to the name of your repository. -5. After a couple of minutes, your public page should be available at `https://.github.io/` +3. After create your repo, go to `Settings > Pages`, on "Build and deployment - Source" select `GitHub Actions`. +4. Go to `Actions` tab and press `I understand my workflows, go ahead and enable them` button +5. Open `router.yml` file and change `base_url` to the name of your repository. +6. After a couple of minutes, your public page should be available at `https://.github.io/` ### Setup From e15842180fa1f0423bcc0c488bdc43b3fc82e22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Sat, 19 Oct 2024 22:12:35 -0300 Subject: [PATCH 8/8] Update taxa_page.yml.example --- config/taxa_page.yml.example | 1 + 1 file changed, 1 insertion(+) diff --git a/config/taxa_page.yml.example b/config/taxa_page.yml.example index 2000e13..68c816c 100644 --- a/config/taxa_page.yml.example +++ b/config/taxa_page.yml.example @@ -10,4 +10,5 @@ taxa_page: - - panel:map - panel:descendants - panel:content + - panel:keys - panel:statistics