Skip to content

Removed Google Analytics from the Druid Website#516

Merged
techdocsmith merged 7 commits intoapache:masterfrom
akulabs8:17647
Feb 25, 2025
Merged

Removed Google Analytics from the Druid Website#516
techdocsmith merged 7 commits intoapache:masterfrom
akulabs8:17647

Conversation

@akulabs8
Copy link

Changes:

  1. Removed the occurrence of 'google-analytics' from the HTML files
  2. Removed the gtag from docusaurus.config.js

Work Item: LINK

@317brian
Copy link
Contributor

Thanks @akulabs8. We'll take a look. Will you work on removing the two other external scripts too?

@akulabs8
Copy link
Author

Yeaaah sure, let me know how to go about it @317brian

@akulabs8
Copy link
Author

akulabs8 commented Feb 3, 2025

@317brian What I get is you might be referring to

Font Awesome
clipboard.min.js

but how to change them right away? we might need to replace it with something else.. so whats that something else?

@317brian
Copy link
Contributor

317brian commented Feb 3, 2025

I think you'd make a local copy of those locally and update the references.

So clipboard.min.js in static/js and then update docusaurus.config.js to refer to it:

And https://github.com/apache/druid-website-src/tree/master/src/css for Font Awesome

I haven't tried it but it should work

And then you can test it by making sure the site still renders (the icons on the homepage etc) and the copy button for the code blocks still work

@akulabs8
Copy link
Author

akulabs8 commented Feb 4, 2025

Hey @317brian , I have made changes in docusaurus.config.js and added the 2 scripts in diff files... please take a look..

Now my question is these scripts are being used at multiple places apart from docusaurus. So we got to worry about those as well?

@317brian
Copy link
Contributor

317brian commented Feb 4, 2025

Thanks for the updates. I'll take a look by EOD Wednesday

I think only the Docusaurus implementation called external scripts.

Copy link
Contributor

@317brian 317brian left a comment

Choose a reason for hiding this comment

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

double post. oops

Copy link
Contributor

@317brian 317brian left a comment

Choose a reason for hiding this comment

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

The clipboard and fontawesome changes need to be find/replaced in the built html files too. Before you do that though, he clipboard copy seems to be working, but it looks like there's a a few issues with fontawesome

  • typo in the fontawesome fix:
href="./src/css/fontawesone.css">

image

@akulabs8
Copy link
Author

akulabs8 commented Feb 6, 2025

Hey @317brian
I have fixed the typo and for replacing in other files , I can do once I fix the fonts issues..

But , I am kinda blocked on the fonts thing. The link you shared has broken image links , I tried to go through other docs but I was not able to pull it off..

Request URL:
http://localhost:3000/static/all.css
Request Method:
GET
Status Code:
200 OK
Remote Address:
[::1]:3000
Referrer Policy:
strict-origin-when-cross-origin

Request URL:
http://localhost:3000/src/css/all.css
Request Method:
GET
Status Code:
200 OK
Remote Address:
[::1]:3000
Referrer Policy:
strict-origin-when-cross-origin

But nothing seem to work..

@317brian
Copy link
Contributor

317brian commented Feb 7, 2025

The download is available on this page: https://fontawesome.com/v5/download

And the instructions for how to use it:
https://docs.fontawesome.com/v5/web/setup/host-font-awesome-yourself

@akulabs8
Copy link
Author

Hey @317brian I have handled the case of webfonts.. I was adding the wrong directory path for the static files. we are not supposed to add "./static" in the file path in docusaurus file.. I have fixed it..

Please take a look and let me know

@317brian
Copy link
Contributor

Thanks! I'll take a look

Copy link
Contributor

@317brian 317brian left a comment

Choose a reason for hiding this comment

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

LGTM, I built a new prod copy and the copy button works and the icons show up on the home page. Also verified. thatthe copy button works in the already built versions in published versions.

The easiest way to resolve the conflicts for the files in is to take the ones in master since I'll be replacing those when I rebuild to republish the site anyway.

@akulabs8
Copy link
Author

@317brian I didnt get it, so shall I take care of thee merge conflicts or you will be taking care of it?

@317brian
Copy link
Contributor

317brian commented Feb 19, 2025

You need to resolve the conflicts. To resolve the conflicts, you can use either the files from your branch or master.

When I republish the website after your fixes get merged, the files that are in conflict right now are going to get overwritten anyway so whether you use your files or the ones from master to resolve the conflict isn't a big deal

@akulabs8
Copy link
Author

@317brian Hey, done with resolving conflicts

@317brian
Copy link
Contributor

Thanks @akulabs8! @techdocsmith is going to review also, and we'll get it merged.

Copy link
Contributor

@techdocsmith techdocsmith left a comment

Choose a reason for hiding this comment

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

  1. ran docs locally & verified Font Awesome images load on landing page
  2. ran the publication script.
  3. verified css and js files are published to the correct directories
  4. verified UA-131010415-1 didn't appear in new output

Thank you @akulabs8 & @317brian for working on this

@techdocsmith techdocsmith merged commit 98f8c05 into apache:master Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants