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

[SPARK-51124][DOC] Self-host JavaScript and CSS in Spark 3.5.0 website #589

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Feb 16, 2025

Execute the following command and regenerate the docs related to version 3.5.0 on v3.5.0 tag

git cherry-pick 31fbf013e7cba1deeb359c0af17295488cf66461
git cherry-pick 3b892bd632502c56c1f76f858a4531f76118024b
git cherry-pick e395f33dd37f212b6e95b08467e95b58acd73d73
git cherry-pick 03f7200d5b6c63a732162b4762f72ac94a64a3f8
cd docs
SKIP_API=1 PRODUCTION=1 bundle exec jekyll build 

then copy all contents in spark/docs/_site to site/docs/3.5.0/ and manually reverted the deletion of the following section:

    <!-- Matomo -->
    <script type="text/javascript">
        var _paq = window._paq = window._paq || [];
        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
        _paq.push(["disableCookies"]);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="https://analytics.apache.org/";
            _paq.push(['setTrackerUrl', u+'matomo.php']);
            _paq.push(['setSiteId', '40']);
            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
            g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
        })();
    </script>
    <!-- End Matomo Code -->

@dongjoon-hyun
Copy link
Member

Is something changed from the previous one, @LuciferYang ?

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Feb 16, 2025

It seems that this PR deletes less number of lines.

Previous one.

+1,360 −14,205 

This one.

+1,360 −10,333

@LuciferYang LuciferYang marked this pull request as draft February 17, 2025 00:12
@LuciferYang
Copy link
Contributor Author

    <!-- Matomo -->
    <script type="text/javascript">
        var _paq = window._paq = window._paq || [];
        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
        _paq.push(["disableCookies"]);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="https://analytics.apache.org/";
            _paq.push(['setTrackerUrl', u+'matomo.php']);
            _paq.push(['setSiteId', '40']);
            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
            g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
        })();
    </script>
    <!-- End Matomo Code -->

should be this part

@dongjoon-hyun
Copy link
Member

Got it. Let me know when this is ready, @LuciferYang .

@LuciferYang LuciferYang marked this pull request as ready for review February 17, 2025 03:43
@LuciferYang LuciferYang marked this pull request as draft February 17, 2025 04:01
@LuciferYang
Copy link
Contributor Author

@dongjoon-hyun One point needs to be clarified.

  1. The PRODUCTION=1 option in SKIP_API=1 PRODUCTION=1 bundle exec jekyll build seems to be ineffective in v3.5.0, as it did not generate the expected
<!-- Matomo -->
    <script type="text/javascript">
        var _paq = window._paq = window._paq || [];
        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
        _paq.push(["disableCookies"]);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="https://analytics.apache.org/";
            _paq.push(['setTrackerUrl', u+'matomo.php']);
            _paq.push(['setSiteId', '40']);
            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
            g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
        })();
    </script>
    <!-- End Matomo Code -->

section when rebuilding the docs. Therefore, I had to manually revert the deletion of this content in each file based on the generated code to maximize consistency with the previous documentation.

  1. If we want the PRODUCTION=1 option to take effect and automatically generate the Matomo section, we need to backport [SPARK-45286][DOCS] Add back Matomo analytics spark#43063 from 3.5.1 to 3.5.0.

  2. Currently, I'm not sure why the documentation in the 3.5.0 code repository still contains the Matomo section, I haven't found the effective parameter to generate it automatically.

@dongjoon-hyun
Copy link
Member

Got it.

@LuciferYang LuciferYang marked this pull request as ready for review February 17, 2025 05:13
@LuciferYang
Copy link
Contributor Author

also cc @gengliangwang

@gengliangwang
Copy link
Member

Thanks for working on this!

@LuciferYang LuciferYang merged commit 70cc6c9 into apache:asf-site Feb 17, 2025
1 check passed
@LuciferYang
Copy link
Contributor Author

Merged into asf-site. Thanks @gengliangwang and @dongjoon-hyun

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