Skip to content

Commit de3d404

Browse files
authored
Merge pull request #280 from rtfpessoa/fix-website
clean: Tweak users section to avoid margin issues
2 parents db48e96 + 2498775 commit de3d404

5 files changed

Lines changed: 339 additions & 280 deletions

File tree

.github/workflows/website.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ jobs:
6262
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6363
run: |
6464
cd website
65-
aws s3 sync . s3://diff2html.xyz --region eu-west-1
65+
aws s3 sync --region eu-west-1 --delete . s3://diff2html.xyz --metadata-directive REPLACE --cache-control max-age=31557600
66+
aws cloudfront create-invalidation --region eu-west-1 --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths '/index.html /demo.html'

webpack.website.ts

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@ const config: webpack.Configuration[] = pages.map(page => {
3030
use: 'ts-loader',
3131
exclude: /node_modules/,
3232
},
33-
{
34-
test: /\.handlebars$/,
35-
loader: 'handlebars-loader',
36-
options: {
37-
precompileOptions: {
38-
knownHelpersOnly: false,
39-
},
40-
helperDirs: [path.join(__dirname, 'website/templates/helpers')],
41-
partialDirs: [path.join(__dirname, 'website/templates')],
42-
},
43-
},
44-
{
45-
test: /\.(css)$/,
46-
use: [MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader'],
47-
},
4833
{
4934
test: /\.(html)$/,
5035
use: {
@@ -55,30 +40,26 @@ const config: webpack.Configuration[] = pages.map(page => {
5540
},
5641
},
5742
{
58-
test: /\.woff(2)?(\?v=\d\.\d\.\d)?$/,
59-
use: [
60-
{
61-
loader: 'url-loader',
62-
options: {
63-
limit: 1000,
64-
mimetype: 'application/font-woff',
65-
},
43+
test: /\.handlebars$/,
44+
loader: 'handlebars-loader',
45+
options: {
46+
inlineRequires: '/images/',
47+
precompileOptions: {
48+
knownHelpersOnly: false,
6649
},
67-
],
68-
},
69-
{
70-
test: /\.(ttf|eot|svg)(\?v=\d\.\d\.\d)?$/,
71-
loader: 'file-loader',
50+
helperDirs: [path.join(__dirname, 'website/templates/helpers')],
51+
partialDirs: [path.join(__dirname, 'website/templates')],
52+
},
7253
},
7354
{
74-
test: /\.(jpeg|jpg|png|gif)$/,
55+
test: /\.(gif|png|jpe?g|webp)$/i,
7556
use: [
7657
{
7758
loader: 'file-loader',
7859
options: {
79-
name: '[name].[ext]',
80-
outputPath: 'images/',
81-
useRelativePath: true,
60+
name: '[name].[ext]?[hash]',
61+
outputPath: 'images',
62+
esModule: false,
8263
},
8364
},
8465
{
@@ -105,6 +86,26 @@ const config: webpack.Configuration[] = pages.map(page => {
10586
},
10687
],
10788
},
89+
{
90+
test: /\.(css)$/,
91+
use: [MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader'],
92+
},
93+
{
94+
test: /\.woff(2)?(\?v=\d\.\d\.\d)?$/,
95+
use: [
96+
{
97+
loader: 'url-loader',
98+
options: {
99+
limit: 1000,
100+
mimetype: 'application/font-woff',
101+
},
102+
},
103+
],
104+
},
105+
{
106+
test: /\.(ttf|eot|svg)(\?v=\d\.\d\.\d)?$/,
107+
loader: 'file-loader',
108+
},
108109
],
109110
},
110111
plugins: [

0 commit comments

Comments
 (0)