Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss #20 - Add Google Analytics key to playbook #21

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

autumnfound
Copy link
Contributor

Resolves #20.

@kito99 kito99 merged commit 94c8d05 into jakartaee:main Jan 19, 2024
4 checks passed
@kito99
Copy link
Contributor

kito99 commented Jan 19, 2024

@autumnfound sorry, I shouldn't have approved this; looks like the key should have underscores. From the docs (https://docs.antora.org/antora/latest/playbook/site-keys/):

site:
  title: Demo Docs Site
  url: https://demo.antora.org
  keys:
    google_analytics: 'XX-123456'

@autumnfound
Copy link
Contributor Author

autumnfound commented Jan 19, 2024

@autumnfound sorry, I shouldn't have approved this; looks like the key should have underscores. From the docs (https://docs.antora.org/antora/latest/playbook/site-keys/):

site:
  title: Demo Docs Site
  url: https://demo.antora.org
  keys:
    google_analytics: 'XX-123456'

From what I'm reading, that only applies to people using the out of the box UI and not overriding the partials. Most of the base partials have been overridden in the jakartaee-documentation-ui project, so the code that would include the GA is not present from what I can tell. I used the casing that is already in the code for GA which was just unused, see https://github.com/jakartaee/jakartaee-documentation-ui/blob/main/src/partials/head-scripts.hbs#L1.

I've been recompiling locally to see if I can get this to display properly, and I'm not seeing it even though it's in the template and other adjacent code is working. I tried with the Antora method and it didn't seem to work either. We might need to update that section.

@kito99
Copy link
Contributor

kito99 commented Jan 19, 2024

@autumnfound I think the casing in the template doesn't necessarily match the casing in the config file. Did you try it with the casing used in the docs?

The UI is a slight modification of the default sample Antora UI, and I don't think we made any changes that would keep the normal functionality from working.

@kito99
Copy link
Contributor

kito99 commented Jan 24, 2024

@autumnfound just to be clear, did you try it locally with the lower case casing? (google_analytics)?

@kito99 kito99 mentioned this pull request Jan 24, 2024
@autumnfound
Copy link
Contributor Author

autumnfound commented Jan 24, 2024

@autumnfound just to be clear, did you try it locally with the lower case casing? (google_analytics)?

I did, and it didn't work. The one that worked this morning for me is the one that's currently configured, which is googleAnalytics. From what I can tell, the version of partials in this repo do not contain the analytics code that is in the base UI provided by Antora, and most files are overridden in this project. We instead have the code that was added by Dan (mojavelinux) ~4y ago that has the key I mentioned.

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.

Add Google Analytics
2 participants