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

Linearsite21 #90

Merged
merged 39 commits into from
Dec 13, 2021
Merged

Linearsite21 #90

merged 39 commits into from
Dec 13, 2021

Conversation

AddMoreScripts
Copy link
Contributor

Contains a complete update of the Apache Ignite site. New design for 2021.

@mstekl
Copy link
Contributor

mstekl commented Nov 12, 2021

1). Would it be possible to get some documentation about how to update, build & deploy the site? Probably most of the Ignite community have zero experience with Pug & web dev tools, and will not know how to run this site locally to make content updates, as well as build & deploy. Also would be helpful to include some basic guides on how the community could make changes to CSS if needed, and recompile on their own.

2). Same thing would be necessary for those sections that will require regular updates, like for example the Upcoming/Past events.

3). I noticed all of the Google Analytics events are not anymore. @dmagda, could you please confirm if we'd like to continue collecting stats and which ones? I guess at least the ones for download page are important, am I right? We used to have something like this:
onclick="gtag('event', 'download', {'event_category': 'apache_ignite_source_download', 'event_label': 'apache-ignite-2.11.0'});">apache-ignite-2.11.0-src.zip</a>

4). Regarding downloads.html file, the compiled .html doesn't include part of the original CGI scripts used by Apache infra. As an example, links to binaries on the older website are composed like this: href="[preferred]/[distdir]/2.11.0/apache-ignite-2.11.0-src.zip
And there are some components to select the downloads mirrors, like on below. Please copy behavior from older .html file

<form action="/download.cgi" method="get" id="SelectMirror">
    Selected mirror:
    <select name="Preferred" onchange="submit()">
        [if-any http]
        [for http]
        <option value="[http]" [is http preferred] selected="selected" [end]>[http]</option>
        [end]
        [end]
        [if-any ftp]
        [for ftp]
        <option value="[ftp]" [is ftp preferred] selected="selected" [end]>[ftp]</option>
        [end]
        [end]
        [if-any backup]
        [for backup]
        <option value="[backup]" [is backup preferred] selected="selected" [end]>[backup] (backup)</option>
        [end]
        [end]
    </select>
    <input type="submit" value="Change"/>
</form>

5). According to this new structure of the repo, the webroot dir is set to be public/. And I'm not sure if it's possible with Apache's infra to serve the website from that dir instead of the root dir, because of other files . Would it be possible to refactor the repo in such way that the Pug source files are placed on a dir like _source/ and setup the build script to output the final files into the root dir?

@dmagda
Copy link

dmagda commented Nov 12, 2021

@mstekl @AddMoreScripts my thoughts on some of the items shared by Mauricio above.

1 - 2) Yes, it needs to be documented. Anyone from the community should be able to install the toolchain, update and release the website. We need to update this Wiki page: https://cwiki.apache.org/confluence/display/IGNITE/Website+Development

  1. Yes, let's keep collecting the events from the Downloads page. The other events we can discontinue for now.

  2. Agree with Mauricio. We have to use those CGI scripts provided by the Apache INFRA.

  3. +1 and the instructions from 1-2) above need to cover the build process.

@AddMoreScripts
Copy link
Contributor Author

@mstekl @dmagda

I ​change structure of the project in last commits. Now, html files are generated to repository root folder.

I wrote small documentation about working and building of the project. I apologize in advance, because English is not my native language.

https://github.com/AddMoreScripts/ignite-website/blob/linearsite21/howto.md

I described only briefly about how to work with the project. For a wiki article, you may need a technical writer to describe everything in more detail and in accordance with the rules. If you will have any questions in the future, I am ready to help.

@mstekl
Copy link
Contributor

mstekl commented Nov 16, 2021

@AddMoreScripts Thanks for the how-to! I followed it but got stuck with some problem when trying to build locally. See the output below when running gulp task. I made sure using latest version of Node, and even tried completely deleting ./node_modules and package-lock

Any clue what could be happening? Thanks in advance!

$ gulp
\/usr/local/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:36
  var exported = require(env.configPath);
                 ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/mstekl/Documents/ignite-website-linearsite21/gulpfile.js from /usr/local/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js not supported.
Instead change the require of gulpfile.js in /usr/local/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js to a dynamic import() which is available in all CommonJS modules.
    at execute (/usr/local/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:36:18)
    at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp-cli/index.js:206:24)
    at Liftoff.execute (/usr/local/lib/node_modules/gulp-cli/node_modules/liftoff/index.js:201:12)
    at module.exports (/usr/local/lib/node_modules/gulp-cli/node_modules/flagged-respawn/index.js:51:3)
    at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp-cli/node_modules/liftoff/index.js:191:5)
    at /usr/local/lib/node_modules/gulp-cli/node_modules/liftoff/index.js:149:9
    at /usr/local/lib/node_modules/gulp-cli/node_modules/v8flags/index.js:145:14
    at /usr/local/lib/node_modules/gulp-cli/node_modules/graceful-fs/graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:188:23) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v17.1.0

@AddMoreScripts
Copy link
Contributor Author

AddMoreScripts commented Nov 16, 2021

It seems to me that there may be a problem in gulp-cli, but I'm not sure. In gulp Quick Start page are recomended to install it.

Is gulp-cli installed globally on your system?
What does the gulp -v command output?

Please try running npm update --global gulp-cli and then running gulp again?

(or npm install --global gulp-cli if not installed)

If this solves the problem, I will add this to the howto.md file

I found, this pull request to gulp-cli official repo, that solver problem in version 2.3.0. This version needs to be installed.

@mstekl
Copy link
Contributor

mstekl commented Nov 16, 2021

@AddMoreScripts Thank you, that solved the problem. Yes, please add it to the how-to guide.

@mstekl
Copy link
Contributor

mstekl commented Nov 19, 2021

@AddMoreScripts I checked the rest of the items (#1, #2, #5) and looks fine to me. As for #4, I see the domain on downloads links changing with the form, but I am not sure if that covers all what the CGI does. @dmagda would you mind reviewing this too? Or point to someone who understands completely what the CGI does?

@AddMoreScripts It would be still necessary to address item #3. Thanks.

@dmagda
Copy link

dmagda commented Nov 19, 2021

@AddMoreScripts

We have to call the "download.cgi" script from the downloads page logic. You can not replace the "download.cgi" with a JS-version. That script is the only script that is executed on the backend. Apache Software Foundation team provided us with this script long time ago and the script decides what mirrors to show for downloads. So we must use it, otherwise, you can break downloads.

@AddMoreScripts
Copy link
Contributor Author

I made all the edits to the texts and page layout.
And also added CGI scripts to the downloads page.

@mstekl
Copy link
Contributor

mstekl commented Nov 30, 2021

@AddMoreScripts thanks for the updates. I've noticed a couple of items:

  1. I noticed some differences with the paths to downloads binaries. This is in your code:
    href="[preferred][distdir]/3.0.0-alpha3/apache-ignite-3.0.0-alpha3.zip"
    And this is on current repo:
    href="[preferred]/[distdir]/3.0.0-alpha3/apache-ignite-3.0.0-alpha3-src.zip"
    Please review in detail the paths and confirm comparing with https://github.com/apache/ignite-website/blob/master/download.html

  2. The Google Analytics events are still missing from the downloads page. For example:
    onclick="gtag('event', 'download', {'event_category': 'apache_ignite_source_download', 'event_label': 'apache-ignite-3.0.0-alpha3'});"

Thanks.

@AddMoreScripts
Copy link
Contributor Author

AddMoreScripts commented Dec 7, 2021

@mstekl
I made some spelling edits and added gtag and google counter to all links on the downloads page.

As for the slash - I noticed that there is an error on the current site - the slash is duplicated in the address, it seems to me that it is already in the variable.

But maybe I'm wrong.

Снимок экрана 2021-11-30 231742

@mstekl
Copy link
Contributor

mstekl commented Dec 8, 2021

ok, thanks. I see your point about the double slashes.
I think everything else looks ok to me now.

@mstekl mstekl merged commit 7ad296d into apache:master Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants