Skip to content

Conversation

derrickmehaffy
Copy link
Member

@derrickmehaffy derrickmehaffy commented Jun 1, 2021

Adds a function that checks for node_env and if it's legacy it sets the base key to /documentation/ else it just sets the base to the vuepress default /

Also added a replacement for the landing meta-refresh


@pwizla / @Mcastres The new landing meta-refresh might make testing locally a lot harder as the vuepress default link it provides in the terminal when you use yarn dev is the base link; meaning when you click it locally you are going to be redirected to the resource center.

We have a few choices here:

  • We create a simple landing page (which would make @Mcastres happy since it gets rid of the legacy meta-refresh)
  • We modify whatever core vuepress package that provides that link and inject some different ones (this is the most complex as I have no idea where it comes from, probably webpack)
  • We keep the existing meta-refresh but that will make it impossible to deploy in one of the two "versions"

The issue here and why all the vercel links are broken right now unless you are on a specific set of branches is because of that base key. Right now we have to set the base as /documentation/ because we are using the https://strapi.io/documentation but with the new URL structure https://docs.strapi.io/ there is no suffix so the base is just simply /


I've set this as a draft til we figure out what we want to do or unless someone can find a hacky way to read the NODE_ENV in the landing README.md file and adjust the meta-refresh link.

fix #306

Adds a function that checks for node_env and if it's legacy it sets the base key to `/documentation/` else it just sets the base to the vuepress default `/`

Also added a replacement for the landing meta-refresh
@derrickmehaffy derrickmehaffy added flag: 💥 Breaking change This PR contains breaking changes and should not be merged flag: don't merge This PR should not be merged at the moment labels Jun 1, 2021
@derrickmehaffy derrickmehaffy requested a review from pwizla June 1, 2021 21:14
@derrickmehaffy derrickmehaffy self-assigned this Jun 1, 2021
@vercel
Copy link

vercel bot commented Jun 1, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/strapijs/documentation/RRjKW2wpnvsaGE61dnTfZy7Q19xz
✅ Preview: https://documentation-git-vercel-workaround-strapijs.vercel.app

@derrickmehaffy
Copy link
Member Author

You can see the example of what will happen when you click on the 2nd vercel link ^^^

You go straight to the resource center.

Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this PR and for taking care of this subject, @derrickmehaffy

I'd suggest we book a quick call soon to discuss it, as I don't fully get:

  • what would be the drawbacks of getting rid of the meta-request?
  • why getting rid of it would imply creating a "landing page"?

Since I have a limited understanding of meta / SEO stuff, I think a call would be more efficient :-) Thank you!

@derrickmehaffy
Copy link
Member Author

Thank you very much for this PR and for taking care of this subject, @derrickmehaffy

I'd suggest we book a quick call soon to discuss it, as I don't fully get:

  • what would be the drawbacks of getting rid of the meta-request?
  • why getting rid of it would imply creating a "landing page"?

Since I have a limited understanding of meta / SEO stuff, I think a call would be more efficient :-) Thank you!

Sure I'll set one up, @Mcastres you want in on this also?

@derrickmehaffy
Copy link
Member Author

@pwizla / @Mcastres per our call I've opted to not redirect the root landing page to the resource center and instead we will just add a top level menu link to it while keeping the main redirection to the dev docs.

@derrickmehaffy derrickmehaffy marked this pull request as ready for review June 7, 2021 13:16
@pwizla pwizla added source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo internal PRs created by the Strapi core team labels Jun 15, 2021
Copy link
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derrickmehaffy derrickmehaffy removed the flag: don't merge This PR should not be merged at the moment label Aug 11, 2021
@derrickmehaffy derrickmehaffy merged commit 15e37cb into main Aug 11, 2021
@derrickmehaffy derrickmehaffy deleted the vercel/workaround branch August 11, 2021 14:01
derrickmehaffy added a commit that referenced this pull request Nov 29, 2021
* Add temp workaround for legacy domain (#307)

* Add temp workaround for legacy domain

Adds a function that checks for node_env and if it's legacy it sets the base key to `/documentation/` else it just sets the base to the vuepress default `/`

Also added a replacement for the landing meta-refresh

* revert resource center redirection

* add resource center link

* Update node env var to fix build bug (#381)

* Add a local node script for legacy (#382)

* Removed Slack from the Navbar Community dropdown (#384)

* Edit the "Create a Go File" section (#388)

The word "built-in" is much more common than "inbuilt".

Go has packages, and we don't need to refer to them as "packages/modules".

Also, add a missing comma.

* remove DO managed db warning (#390)

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Add hiring link (#387)

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Case for 1 can be handled in loop (#370)

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Change code snippet for service create customisation (#372)

* Change code snippet for service create customisation

* Review changes

* VuePress enhancements (#368)

* Add consistency

* Add strapi & prerequisites Markdown containers

Note: Using babel-style for plugins declarations as it seems to work
better with multiple declarations for vuepress-plugin-container

* Use :::strapi and :::prerequisites in existing docs

* Add generic callout, tweak strapi & tip callouts, and clean config file

* Clean up unused inline styles from Markdown files

* Remove 🤓 from Markdown files in strapi callouts as it's now included

* Use generic callout for congratulations in QSG

* Add api-call, request and response custom containers

* Fully redesign style for request & response containers

* Use api-callout container on existing documentation

* Remove emoji from :::strapi as it's included

* Add 'note' custom callout

* Add 'important', 'caution' and 'warning' custom callouts

In our mind, they are 3 different levels:
- important, the less strong
- caution, medium importance ( = VuePress's default 'warning')
- warning, the strongest ( = VuePress's default 'danger')

* Remove important callout & cleanup CSS

We decided that we'll go with a unique callout, "caution". The title
can still be adjusted when necessary.

* Merge branch 'repo/snippets' into repo/vuepress-enhanced

* Apply new callouts and minimal tab styles everywhere

* Apply minimal tabs to integration guides

* Update VuePress to 1.8.2

* Temporarily setting root url (testing Vercel deploy)

* Revert "Temporarily setting root url (testing Vercel deploy)"

This reverts commit ba7b7d2.

* Use code-blocks and code-groups everywhere appropriate

* Tweak request/response CSS based on designers feedback

* Simplify some wordings in i18n doc

* Apply api-call/request/response containers throughout the docs

* Tweak request/response CSS for use outside of :::api-call

* Update callouts in the user guide

* Remove Google Analytics Vuepress plugin and add GTM

See [this PR](#380)

* Temp remove yarn.lock to fix conflicts

* Fix emoji for warning callout

* Converting warning to note callout in Templates file

* Fix QSG callouts

* Add yarn.lock

* Remove marketing note at end of 21yunbox hosting guide

* Removing GTM script from plugins (it's already in head)

* Don't make text prop required in badges as a default is already provided

Co-authored-by: Mégane Lacheny <megane.lacheny@strapi.io>

* Highlight active tab in blue instead of default VuePress green (#393)

* Fix CLI commands for Hand-on path in QSG (#395)

* Launch the server: added steps to execute build & start on windows (#394)

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Remove breaking markdown on laravel page (#398)

* Remove breaking markdown on laravel page

There was a line that broke the layout of the entire page, making everything after the tag be placed inline. By removing this it will all be normal and readable again.

* Close a block in the angular documentation

* Close a block in the gridsome documentation

* Close a block in the 11ty documentation

* Update python.md (#400)

Fixed the syntax error in line 125.

* Update laravel.md (#402)

Fixed a wrong word

* small grammar fix (#405)

from "is uses" to "uses"

* Update is/are conjugation mistake in FAQ (#406)

* Add Okta example to SSO (#396)

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Grammar correction (#414)

* Use a nodejs version supported by Strapi (#411)

Node v10 is not supported anymore. See https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/deployment.html

Use Node v14 in Standard Environment. See https://cloud.google.com/appengine/docs/standard/nodejs/runtime#node.js-14
Note about Flexible Environment: It will derive the right Node version from package.json. See https://cloud.google.com/appengine/docs/flexible/nodejs/runtime

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Fix socketPath usage on google app engine (#392)

See https://stackoverflow.com/a/67395883/856702

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update laravel.md (#410)

A config file is needed

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Fix for the Okta sample config (#419)

* Fix grammar (#421)

* Update migration-guide-3.4.x-to-3.4.4.md

* Update migration-guide-3.4.x-to-3.4.4.md

* Update sentence for initializer in folder structure (#426)

* Update README.md (#427)

Update Node version: https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/installation/cli.html#preparing-the-installation
`Node.js (opens new window): only LTS versions are supported (version 12.x minimum). Other versions of Node.js may not be compatible with the latest release of Strapi. The 14.x version is most recommended by Strapi.`

* [dev/latest-guides-auth-request] Fixed grammatical error (#431)

* Fixed grammatical error

* Fixed to better match style guide

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* npm build command doesn't work. Use npm run build (#440)

See: 
https://stackoverflow.com/questions/29939697/npm-build-doesnt-run-the-script-named-build-in-package-json

This should also be updated across the docs wherever its found. Maybe I'll go hunting soon if this one gets merged (first time contributor here 😊)

* Update note in v3 migration guides (#449)

* fix publicationState filter docs (#425)

Co-authored-by: DMehaffy <derrickmehaffy@gmail.com>
Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Believe there is a typo in the file name (#471)

servers.js should be server.js

* [v3] CLI Node version reference (#470)

* [v3] CLI Node version reference

* make it clear we won't backport node 16 support

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Add Strapi handbook links (#492)

* Update 'Database Access' location (#487)

The mongodb dashboard does not have an 'Overview' section anymore as implied in the strapi mongodb docs. They now have a 'Deployment' section and 'Database Access' has been moved to the 'Security' section.

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

* Update amazon-aws.md (#484)

Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>

Co-authored-by: Richard Nsama <kasonde.nsama@gmail.com>
Co-authored-by: Mike Casebolt <mikebolt@gmail.com>
Co-authored-by: Collisio Technologies <54179909+Collisio@users.noreply.github.com>
Co-authored-by: Pierre Wizla <pwizla@users.noreply.github.com>
Co-authored-by: Pierre Burgy <pierre.burgy@gmail.com>
Co-authored-by: Daniel Gustaw <gustaw.daniel@gmail.com>
Co-authored-by: Bartek Kowalik <bkowalik@users.noreply.github.com>
Co-authored-by: Mégane Lacheny <megane.lacheny@strapi.io>
Co-authored-by: ericrinaldo <52439561+ericrinaldo@users.noreply.github.com>
Co-authored-by: Marinus van Velzen <rienvanvelzen@gmail.com>
Co-authored-by: Asiful Alam <47291401+Faheem2k19@users.noreply.github.com>
Co-authored-by: Precious Luke <lukeprecious20@yahoo.com>
Co-authored-by: Mustapha Hamoui <mustapha.hamoui@gmail.com>
Co-authored-by: Victor Jansson <victor.jansson@gmail.com>
Co-authored-by: Chidume Nnamdi <kurtwanger40@gmail.com>
Co-authored-by: Tobias L. Maier <me@tobiasmaier.info>
Co-authored-by: Cihad Turhan <cihadturhan@users.noreply.github.com>
Co-authored-by: Josh Post <4186365+posty72@users.noreply.github.com>
Co-authored-by: Sujay <33504917+SujayPrabhu96@users.noreply.github.com>
Co-authored-by: teinett <teine@teine.ru>
Co-authored-by: Brendan Laney <Brlaney@outlook.com>
Co-authored-by: Chizaram Nwazuo <44569600+nwazuo@users.noreply.github.com>
Co-authored-by: petr-hajek <38785076+petr-hajek@users.noreply.github.com>
Co-authored-by: Craig Harman <324026+craigharman@users.noreply.github.com>
Co-authored-by: Aboluwade Oluwasegun <36123150+aboluwade-oluwasegun@users.noreply.github.com>
Co-authored-by: KAILASA's Sri Nithya Priyeshananda <68758690+sripriyesha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flag: 💥 Breaking change This PR contains breaking changes and should not be merged internal PRs created by the Strapi core team source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

404 on vercel

2 participants