Skip to content

Commit

Permalink
feat: add SEO and fix some bugs and sync with change of repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
eggachecat committed Jan 24, 2024
1 parent 5bf3d85 commit 16e18e9
Show file tree
Hide file tree
Showing 10 changed files with 169 additions and 20 deletions.
2 changes: 1 addition & 1 deletion configs/webpack/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = merge(commonConfig, {
output: {
filename: "js/bundle.[contenthash].min.js",
path: resolve(__dirname, "../../docs"),
publicPath: "/jycm-viewer/",
publicPath: "/jycm-json-diff-viewer/",
},
devtool: "source-map",
plugins: [],
Expand Down
18 changes: 17 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><title>JYCM Viewer</title><script defer="defer" src="/jycm-viewer/js/bundle.5afe39372615916ee311.min.js"></script></head><body><div id="root"></div><script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.production.min.js" integrity="sha512-qlzIeUtTg7eBpmEaS12NZgxz52YYZVF5myj89mjJEesBd/oE9UPsYOX2QAXzvOAZYEvQohKdcY8zKE02ifXDmA==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js" integrity="sha512-9jGNr5Piwe8nzLLYTk8QrEMPfjGU0px80GYzKZUxi7lmCfrBjtyCc1V5kkS5vxVwwIB7Qpzc7UxLiQxfAN30dw==" crossorigin="anonymous"></script></body></html>
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><title>JYCM - Configurable JSON DIff Viewer</title><meta name="description" content="Configurable OpenSource JSON Diff Tool - Effortlessly compare and identify differences in JSON with configurations, ideal for developers and data analysts."><script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "SoftwareApplication",
"headline": "An advanced tool for comparing and identifying differences in JSON configurations, suitable for developers and data analysts.",
"author": {
"@type": "Person",
"name": "eggachecat"
},
"name": "JYCM - Configurable JSON Diff Tool",
"description": "An advanced tool for comparing and identifying differences in JSON configurations, suitable for developers and data analysts.",
"applicationCategory": "DeveloperTools",
"operatingSystem": "All"
}</script><script async src="https://www.googletagmanager.com/gtag/js?id=G-5Y9JVDQ8LB"></script><script>window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', 'G-5Y9JVDQ8LB');</script><script defer="defer" src="/jycm-json-diff-viewer/js/bundle.57bd0d3cfde5624d9aeb.min.js"></script></head><body><div id="root"></div></body></html>
3 changes: 3 additions & 0 deletions docs/js/bundle.57bd0d3cfde5624d9aeb.min.js

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions docs/js/bundle.57bd0d3cfde5624d9aeb.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */

/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions docs/js/bundle.57bd0d3cfde5624d9aeb.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/js/bundle.60f109757868fb6e04a3.min.js

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions docs/js/bundle.60f109757868fb6e04a3.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */

/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions docs/js/bundle.60f109757868fb6e04a3.min.js.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion express.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
const express = require('express');
const app = express();
const portNumber = 3000;
const sourceDir = 'dist';
const sourceDir = 'docs';

app.use(function (req, res, next) {
req.url = req.url.replace("/jycm-viewer", "");
next();
});

app.use(express.static(sourceDir));

Expand Down
54 changes: 37 additions & 17 deletions src/index.html.ejs
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>JYCM Viewer</title>
</head>
<body>
<div id="root"></div>

<!-- Dependencies -->
<% if (webpackConfig.mode == 'production') { %>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.production.min.js" integrity="sha512-qlzIeUtTg7eBpmEaS12NZgxz52YYZVF5myj89mjJEesBd/oE9UPsYOX2QAXzvOAZYEvQohKdcY8zKE02ifXDmA==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js" integrity="sha512-9jGNr5Piwe8nzLLYTk8QrEMPfjGU0px80GYzKZUxi7lmCfrBjtyCc1V5kkS5vxVwwIB7Qpzc7UxLiQxfAN30dw==" crossorigin="anonymous"></script>
<% } else { %>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.development.js" integrity="sha512-Vf2xGDzpqUOEIKO+X2rgTLWPY+65++WPwCHkX2nFMu9IcstumPsf/uKKRd5prX3wOu8Q0GBylRpsDB26R6ExOg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.development.min.js" integrity="sha512-aNBFq6ue8EmNDwVD/l0mWFy3iVZLIxtQaD7fEYBn3HluJer36T1AhJK0THj6MKKfhZrexxWsKX1T16TxLZo6uQ==" crossorigin="anonymous"></script>
<% } %>
</body>
</html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>JYCM - Configurable JSON DIff Viewer</title>
<meta name="description"
content="Configurable OpenSource JSON Diff Tool - Effortlessly compare and identify differences in JSON with configurations, ideal for developers and data analysts.">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SoftwareApplication",
"headline": "An advanced tool for comparing and identifying differences in JSON configurations, suitable for developers and data analysts.",
"author": {
"@type": "Person",
"name": "eggachecat"
},
"name": "JYCM - Configurable JSON Diff Tool",
"description": "An advanced tool for comparing and identifying differences in JSON configurations, suitable for developers and data analysts.",
"applicationCategory": "DeveloperTools",
"operatingSystem": "All"
}
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5Y9JVDQ8LB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-5Y9JVDQ8LB');
</script>
</head>

<body>
<div id="root"></div>
</body>

</html>

0 comments on commit 16e18e9

Please sign in to comment.