Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Inject analytics script into rustdocs #14805

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liamaharon
Copy link
Contributor

@carinaluise asked for our simple analytics script to be embedded in the head of our rust doc html pages.

I've been testing it on my fork where it seems to be working https://github.com/liamaharon/substrate/tree/gh-pages

@liamaharon liamaharon added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Aug 22, 2023
@jimmychu0807
Copy link
Contributor

I believe I am not the right person to review the code. I am not familiar with the code base.

@liamaharon liamaharon requested review from kianenigma and removed request for jimmychu0807 August 22, 2023 09:41
export -f process_file

# Locate all .html files under the documentation root and use xargs to process in parallel.
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
Copy link
Member

Choose a reason for hiding this comment

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

Is nproc expected to be installed in this environment? Can you test it in a CI or where is this normally run?

@liamaharon liamaharon marked this pull request as draft August 23, 2023 07:36
@liamaharon
Copy link
Contributor Author

liamaharon commented Aug 23, 2023

Converting back to draft, it seems .maintain/rustdocs-release.sh isn't in use anymore

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants