diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 206667d..1314c01 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -62,4 +62,5 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: | cd website - aws s3 sync . s3://diff2html.xyz --region eu-west-1 + aws s3 sync --region eu-west-1 --delete . s3://diff2html.xyz --metadata-directive REPLACE --cache-control max-age=31557600 + aws cloudfront create-invalidation --region eu-west-1 --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths '/index.html /demo.html' diff --git a/webpack.website.ts b/webpack.website.ts index 3986436..94d574b 100644 --- a/webpack.website.ts +++ b/webpack.website.ts @@ -30,21 +30,6 @@ const config: webpack.Configuration[] = pages.map(page => { use: 'ts-loader', exclude: /node_modules/, }, - { - test: /\.handlebars$/, - loader: 'handlebars-loader', - options: { - precompileOptions: { - knownHelpersOnly: false, - }, - helperDirs: [path.join(__dirname, 'website/templates/helpers')], - partialDirs: [path.join(__dirname, 'website/templates')], - }, - }, - { - test: /\.(css)$/, - use: [MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader'], - }, { test: /\.(html)$/, use: { @@ -55,30 +40,26 @@ const config: webpack.Configuration[] = pages.map(page => { }, }, { - test: /\.woff(2)?(\?v=\d\.\d\.\d)?$/, - use: [ - { - loader: 'url-loader', - options: { - limit: 1000, - mimetype: 'application/font-woff', - }, + test: /\.handlebars$/, + loader: 'handlebars-loader', + options: { + inlineRequires: '/images/', + precompileOptions: { + knownHelpersOnly: false, }, - ], + helperDirs: [path.join(__dirname, 'website/templates/helpers')], + partialDirs: [path.join(__dirname, 'website/templates')], + }, }, { - test: /\.(ttf|eot|svg)(\?v=\d\.\d\.\d)?$/, - loader: 'file-loader', - }, - { - test: /\.(jpeg|jpg|png|gif)$/, + test: /\.(gif|png|jpe?g|webp)$/i, use: [ { loader: 'file-loader', options: { - name: '[name].[ext]', - outputPath: 'images/', - useRelativePath: true, + name: '[name].[ext]?[hash]', + outputPath: 'images', + esModule: false, }, }, { @@ -105,6 +86,26 @@ const config: webpack.Configuration[] = pages.map(page => { }, ], }, + { + test: /\.(css)$/, + use: [MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader'], + }, + { + test: /\.woff(2)?(\?v=\d\.\d\.\d)?$/, + use: [ + { + loader: 'url-loader', + options: { + limit: 1000, + mimetype: 'application/font-woff', + }, + }, + ], + }, + { + test: /\.(ttf|eot|svg)(\?v=\d\.\d\.\d)?$/, + loader: 'file-loader', + }, ], }, plugins: [ diff --git a/website/templates/pages/index/content.handlebars b/website/templates/pages/index/content.handlebars index d628f4d..d4bb8fb 100644 --- a/website/templates/pages/index/content.handlebars +++ b/website/templates/pages/index/content.handlebars @@ -12,7 +12,7 @@
- Diff2Html pretty html side-by-side example render
@@ -72,7 +72,7 @@ Copy

- + Find usage examples in the Docs

@@ -85,7 +85,8 @@

With command line integration

We work hard to make sure you can have your diffs in a simple and flexible - way. Go here for the full + way. Go here for the full documentation.

@@ -116,249 +117,307 @@

Projects using diff2html

-
-
-

diff2html-cli

-
-
-

diff2html from your terminal to the browser.

-
- +
+
+
+

diff2html-cli

+
+
+

diff2html from your terminal to the browser.

+
+ +
-
-
-

Codacy

-
-
-

Check code style, security, duplication, complexity and coverage on every change.

-
- +
+
+
+

Codacy

+
+
+

Check code style, security, duplication, complexity and coverage on every change.

+
+ +
-
-
-

Ungit

-
-
-

The easiest way to use git. On any platform. Anywhere.

-
- +
+
+
+

Ungit

+
+
+

The easiest way to use git. On any platform. Anywhere.

+
+ +
-
-
-

Diffy

-
-
-

Share your diffs and explain your ideas without committing.

-
- +
+
+
+

Diffy

+
+
+

Share your diffs and explain your ideas without committing.

+
+ +
-
-
-

Jenkins

-
-
-

Show diffs between builds

-
- +
+
+
+

Jenkins

+
+
+

Show diffs between builds

+
+ +
-
-
-

jest-stare

-
-
-

Jest HTML Reporter and Results Processor.

-
- +
+
+
+

jest-stare

+
+
+

Jest HTML Reporter and Results Processor.

+
+ +
-
-
-

kubeapps

-
-
-

A web-based UI for deploying and managing applications in Kubernetes clusters.

-
- +
+
+
+

kubeapps

+
+
+

A web-based UI for deploying and managing applications in Kubernetes clusters.

+
+ +
-
-
-

Hitchhiker

-
-
-

A a Restful Api test tool.

-
- +
+
+
+

Hitchhiker

+
+
+

A a Restful Api test tool.

+
+ +
-
-
-

growi

-
-
-

Team collaboration software using markdown.

-
- +
+
+
+

growi

+
+
+

Team collaboration software using markdown.

+
+ +
-
-
-

crowi

-
-
-

Markdown Wiki - Empower the team with sharing your knowledge.

-
- +
+
+
+

crowi

+
+
+

Markdown Wiki - Empower the team with sharing your knowledge.

+
+ +
-
-
-

Wiki.js

-
-
-

A modern, lightweight and powerful wiki app built on Node.js.

-
- +
+
+
+

Wiki.js

+
+
+

A modern, lightweight and powerful wiki app built on Node.js.

+
+ +
-
-
-

code-annotation

-
-
-

Code Annotation Tool.

-
- +
+
+
+

code-annotation

+
+
+

Code Annotation Tool.

+
+ +
-
-
-

Chef Automate

-
-
-

full suite of enterprise capabilities for maintaining continuous visibility into application, - infrastructure, and security automation.

-
- +
+
+
+

Chef Automate

+
+
+

full suite of enterprise capabilities for maintaining continuous visibility into application, + infrastructure, and security automation.

+
+ +
-
-
-

Camunda Modeler

-
-
-

An integrated modeling solution for BPMN, DMN and CMMN based on bpmn.io.

-
- +
+
+
+

Camunda Modeler

+
+
+

An integrated modeling solution for BPMN, DMN and CMMN based on bpmn.io.

+
+ +
-
-
-

graphql-schema-diff

-
-
-

Returns the diff of two GraphQL schemas. Detects dangerous and breaking changes.

-
- +
+
+
+

graphql-schema-diff

+
+
+

Returns the diff of two GraphQL schemas. Detects dangerous and breaking changes.

+
+ +
-
-
-

cypress-plugin-snapshots

-
-
-

Plugin for snapshot tests in Cypress.io .

-
- +
+
+
+

cypress-plugin-snapshots

+
+
+

Plugin for snapshot tests in Cypress.io .

+
+ +
-
-
-

git-explorer

-
-
-

Offline-first support for previewing and comparing branches in a local git repository.

-
- +
+
+
+

git-explorer

+
+
+

Offline-first support for previewing and comparing branches in a local git repository.

+
+ +
-
-
-

diff-pane

-
-
-

Atom - Diff two panes.

-
- +
+
+
+

diff-pane

+
+
+

Atom - Diff two panes.

+
+ +
-
-
-

node-giff

-
-
-

Display git diff on browser.

-
- +
+
+
+

node-giff

+
+
+

Display git diff on browser.

+
+ +
-
-
-

edgar-monitor

-
-
-

A module that processes new Edgar filings and sends out notifications.

-
- +
+
+
+

edgar-monitor

+
+
+

A module that processes new Edgar filings and sends out notifications.

+
+ +
-
-
-

node-git

-
-
-

Execute Git Command by Node.js.

-
- +
+
+
+

node-git

+
+
+

Execute Git Command by Node.js.

+
+ +
-
-
-

Simple Git

-
-
-

A simple package to be able to drive GIT.

-
- +
+
+
+

Simple Git

+
+
+

A simple package to be able to drive GIT.

+
+ +
@@ -369,10 +428,12 @@

Open Source

diff2html is open source. If you'd like to be part of the diff2html community or help improve it, - find more information on GitHub and - Gitter. Need any help? + find more information on GitHub and + Gitter. + Need any help?

- + Read more in the Docs
diff --git a/website/templates/pages/index/index.css b/website/templates/pages/index/index.css index ec17ee3..fdf0891 100644 --- a/website/templates/pages/index/index.css +++ b/website/templates/pages/index/index.css @@ -1,5 +1,4 @@ .image img.hero-img { - background-image: url(images/snapshot-3.png); display: block; height: auto; width: 70%; @@ -43,16 +42,10 @@ cursor: pointer; } -.button.clipboard:hover { - color: #000; - background-color: #dcdfe4; +.is-fullwidth { + flex-grow: 1; } -#users .columns .column { - display: flex; +.is-vertical { flex-direction: column; } - -#users .columns .column section { - height: 100%; -} diff --git a/website/templates/template.handlebars b/website/templates/template.handlebars index bd8fb1d..c7cd6f6 100644 --- a/website/templates/template.handlebars +++ b/website/templates/template.handlebars @@ -6,8 +6,11 @@ - + + + + @@ -57,10 +60,10 @@ Getting Started CLI Demo - Docs - Support + Docs + Support
@@ -72,11 +75,11 @@

Designed and built with by - @rtfpessoa. + @rtfpessoa.

- FAQ + FAQ - diff2html

@@ -89,7 +92,7 @@ "@type": "SoftwareSourceCode", "name": "diff2html", "author": "Rodrigo Fernandes", - "image": "https://diff2html.xyz/img/snapshot-3.png", + "image": "https://diff2html.xyz/images/snapshot-3.png", "description": "Diff parser and pretty html generator.", "codeRepository": "https://github.com/rtfpessoa/diff2html", "programmingLanguage": "JavaScript",