You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/23 13:25:08 UTC

[GitHub] [arrow-site] AlenkaF opened a new pull request, #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

AlenkaF opened a new pull request, #275:
URL: https://github.com/apache/arrow-site/pull/275

   This PR inserts a script element into all `.html` files which calls a `/docs/versionwarning.js` file. The file adds a version warning to the `.html` page if the file path matches any of the 4 criteria:
   - the page is under developers section in stable release
   - the page is in the docs for arrow version older then 4.0
   - the page is under developers section and in the docs for older arrow version (but at least 4.0)
   - the page is in the docs for older arrow version (but at least 4.0)
   
   Each of these warnings has its own warning message.
   
   **This PR is a part of Jira to GitHub migration work.**
   
   ## Hot to test the code locally?
   1. Checkout any commit from `arrow-site/asf-site` other than this one
   2. Save [versionwarning.js ](https://gist.github.com/AlenkaF/1f3e734b1ff2c5fa2b4ae808345aaa94) to `arrow-site/docs/` folder
   3. Run next code snippet in the terminal (for MacOS, should be a bit different for Linux/Wind) from the **arrow-site/docs** folder. You will have to check/correct numbers 6&7 from the snippet.
   My path to `arrow-site/docs` is `/Users/alenkafrim/repos/arrow-site/docs` and is a "length" of 5 so numbers I used down bellow were 6&7. If the length of you path is 7 then you need to change 6 with 8 and 7 with 9 😬 
   I am searching for a shell function to give the length and I can automate this step =)
   
   ```
   # Run this from the arrow-site/docs/ folder (check the numbers 6&7!)
   sed -i '' "s/'arrow.apache.org'/''/" versionwarning.js
   sed -i '' "s/\[2\]/\[6\]/" versionwarning.js
   sed -i '' "s/\[3\]/\[7\]/" versionwarning.js
   # insert the JS file into all the html files in /docs
   find . -iname "*.html" | xargs sed -i '' '/<\/body>/ i\
   <script type="text/javascript" src="$(pwd)/versionwarning.js"></script>'
   ```
   
   ---
   
   This is the visual from my local tests:
   ![Screenshot 2022-11-23 at 13 24 11](https://user-images.githubusercontent.com/16418547/203546228-899c8e9d-5c44-42ff-8031-e08a60453da7.png)
   ![Screenshot 2022-11-23 at 13 24 14](https://user-images.githubusercontent.com/16418547/203546237-11d75f82-e695-4367-8408-5c42aef43964.png)
   ![Screenshot 2022-11-23 at 13 24 17](https://user-images.githubusercontent.com/16418547/203546246-dd849753-8c3e-4925-8f8d-bc3d58d63f88.png)
   ![Screenshot 2022-11-23 at 13 24 20](https://user-images.githubusercontent.com/16418547/203546260-e37bc322-cf71-4eb6-8a55-bd7803f0cef6.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-site] AlenkaF commented on pull request #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

Posted by GitBox <gi...@apache.org>.
AlenkaF commented on PR #275:
URL: https://github.com/apache/arrow-site/pull/275#issuecomment-1335263087

   Oh thanks for reminding me of that!! Will correct the version here and update the release script together with updating `layout.html` in a separate PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-site] jorisvandenbossche commented on pull request #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on PR #275:
URL: https://github.com/apache/arrow-site/pull/275#issuecomment-1335229627

   I can't officially "approve" the PR as I don't get into the Files changed tab (it indicates an infinity of touched files ...). But from a local checkout, this looks good!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-site] jorisvandenbossche commented on pull request #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on PR #275:
URL: https://github.com/apache/arrow-site/pull/275#issuecomment-1342284833

   Thanks for the update! Let's give this a try


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-site] jorisvandenbossche merged pull request #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche merged PR #275:
URL: https://github.com/apache/arrow-site/pull/275


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-site] jorisvandenbossche commented on pull request #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on PR #275:
URL: https://github.com/apache/arrow-site/pull/275#issuecomment-1342513582

   Seems to be working fine!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-site] jorisvandenbossche commented on pull request #275: ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs)

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on PR #275:
URL: https://github.com/apache/arrow-site/pull/275#issuecomment-1335255865

   One small thing -> `latestStable` is already 10.0.1 at the moment. 
   
   We will also have to update the release script for the docs to update that line (`post-08-docs.sh` in the arrow repo)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org