-
-
Notifications
You must be signed in to change notification settings - Fork 49
feat:optimized (SEO) #139
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
base: main
Are you sure you want to change the base?
feat:optimized (SEO) #139
Changes from all commits
e63e54c
dc11c01
a29852f
e6f67c1
71e32ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,58 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <link rel="icon" href="%PUBLIC_URL%/%REACT_APP_LOGO_PATH%" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="theme-color" content="#000000" /> | ||
| <meta property="og:title" content="Djed on %REACT_APP_BC%" /> | ||
| <meta name="description" content="Djed is a formally verified crypto-backed autonomous stablecoin protocol. It has been researched since Q2 2020, its whitepaper has been released in August 2021, and it has multiple implementations and deployments. Here you can interact with a deployment that uses these smart contracts on %REACT_APP_BC%." /> | ||
| <meta property="og:description" content="Djed is a formally verified crypto-backed autonomous stablecoin protocol. It has been researched since Q2 2020, its whitepaper has been released in August 2021, and it has multiple implementations and deployments. Here you can interact with a deployment that uses these smart contracts on %REACT_APP_BC%." /> | ||
| <meta property="og:image" content="%PUBLIC_URL%/%REACT_APP_LOGO_PATH%" /> | ||
| <meta property="og:url" content="%PUBLIC_URL%" /> | ||
| <meta name="twitter:card" content="summary_large_image"> | ||
| <meta property="twitter:url" content="%PUBLIC_URL%"> | ||
| <meta name="twitter:title" content="Djed on Ethereum Classic"> | ||
| <meta name="twitter:description" content="Djed is a formally verified crypto-backed autonomous stablecoin protocol. It has been researched since Q2 2020, its whitepaper has been released in August 2021, and it has multiple implementations and deployments. Here you can interact with a deployment that uses these smart contracts on Ethereum Classic."> | ||
| <meta name="twitter:image" content="%PUBLIC_URL%/%REACT_APP_LOGO_PATH%"> | ||
| <!--link rel="apple-touch-icon" href="%PUBLIC_URL%/logo180.png" /--> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;600&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <!-- | ||
| manifest.json provides metadata used when your web app is installed on a | ||
| user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
| --> | ||
| <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
| <!-- | ||
| Notice the use of %PUBLIC_URL% in the tags above. | ||
| It will be replaced with the URL of the `public` folder during the build. | ||
| Only files inside the `public` folder can be referenced from the HTML. | ||
|
|
||
| Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
| work correctly both with client-side routing and a non-root public URL. | ||
| Learn how to configure a non-root public URL by running `npm run build`. | ||
| --> | ||
| <title></title> | ||
| </head> | ||
|
|
||
| <body> | ||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||
| <div id="root"></div> | ||
| <!-- | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="theme-color" content="#000000" /> | ||
| <meta name="robots" content="index, follow" /> | ||
|
|
||
| <!-- Canonical: deployment-scoped --> | ||
| <link rel="canonical" href="<%= htmlWebpackPlugin.options.templateParameters.REACT_APP_DEPLOYMENT_URL %>" /> | ||
|
|
||
| <!-- Primary SEO --> | ||
| <title>Djed – Stablecoin Protocol</title> | ||
| <meta name="description" | ||
| content="Official Djed frontend. Djed is a formally verified, decentralized crypto-backed stablecoin protocol." /> | ||
|
|
||
| <!-- Open Graph --> | ||
| <meta property="og:type" content="website" /> | ||
| <meta property="og:title" content="Djed – Stablecoin Protocol" /> | ||
| <meta property="og:description" | ||
| content="Official Djed frontend enabling interaction with the Djed stablecoin protocol." /> | ||
| <meta property="og:url" content="<%= htmlWebpackPlugin.options.templateParameters.REACT_APP_DEPLOYMENT_URL %>" /> | ||
| <meta property="og:image" | ||
| content="<%= (htmlWebpackPlugin.options.templateParameters.PUBLIC_URL || '').replace(/\/$/, '') %>/<%= (htmlWebpackPlugin.options.templateParameters.REACT_APP_LOGO_PATH || '').replace(/^\//, '') %>" /> | ||
|
|
||
| <!-- Twitter --> | ||
| <meta name="twitter:card" content="summary_large_image" /> | ||
| <meta name="twitter:url" content="<%= htmlWebpackPlugin.options.templateParameters.REACT_APP_DEPLOYMENT_URL %>" /> | ||
| <meta name="twitter:title" content="Djed – Stablecoin Protocol" /> | ||
| <meta name="twitter:description" content="Official Djed frontend." /> | ||
| <meta name="twitter:image" | ||
| content="<%= (htmlWebpackPlugin.options.templateParameters.PUBLIC_URL || '').replace(/\/$/, '') %>/<%= (htmlWebpackPlugin.options.templateParameters.REACT_APP_LOGO_PATH || '').replace(/^\//, '') %>" /> | ||
|
|
||
| <!-- App identity --> | ||
| <link rel="icon" | ||
| href="<%= (htmlWebpackPlugin.options.templateParameters.PUBLIC_URL || '').replace(/\/$/, '') %>/<%= (htmlWebpackPlugin.options.templateParameters.REACT_APP_LOGO_PATH || '').replace(/^\//, '') %>" /> | ||
|
|
||
| <!-- Fonts --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&display=swap" | ||
| rel="stylesheet" /> | ||
| <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;600&display=swap" rel="stylesheet" /> | ||
|
|
||
| <!-- PWA --> | ||
| <link rel="manifest" | ||
| href="<%= (htmlWebpackPlugin.options.templateParameters.PUBLIC_URL || '').replace(/\/$/, '') %>/manifest.json" /> | ||
| </head> | ||
|
Comment on lines
+4
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, check the project structure and build configuration
ls -la | grep -E "(craco|webpack|package.json|tsconfig)"Repository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 213 🏁 Script executed: # Check package.json for build scripts and dependencies
cat package.json | grep -A 20 '"scripts"' | head -30Repository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 877 🏁 Script executed: # Look for craco configuration
if [ -f "craco.config.js" ]; then
echo "=== craco.config.js found ==="
cat craco.config.js
else
echo "craco.config.js not found"
fiRepository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 1333 🏁 Script executed: # Check if html-webpack-plugin is in dependencies
grep -i "html-webpack-plugin\|craco\|env-cmd" package.jsonRepository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 604 🏁 Script executed: # Check for post-build scripts or any html processing
grep -r "post-build\|replace\|substitute" --include="*.json" --include="*.js" --include="*.sh" 2>/dev/null | head -20Repository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 10055 🏁 Script executed: # Check the environment files to understand REACT_APP_DEPLOYMENT_URL structure
ls -la env/
cat env/*.env 2>/dev/null | head -50Repository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 2844 🏁 Script executed: # Look for any deployment or build-related scripts in the repo
find . -maxdepth 2 -type f -name "*.sh" -o -name "*build*" -o -name "*deploy*" | grep -v node_modules | head -20Repository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 65 🏁 Script executed: # Check if there's any custom processing in public/index.html or related files
find public/ -type f 2>/dev/nullRepository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 524 🏁 Script executed: # Examine if react-scripts or CRA handles custom env variables in index.html
# Check the actual content of index.html more carefully
cat -n public/index.html | head -50Repository: DjedAlliance/Djed-Solidity-WebDashboard Length of output: 2441 Fix custom environment variable replacement in index.html during build. The Configure const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
webpack: {
configure: (webpackConfig) => {
// ... existing config ...
// Find and modify the HtmlWebpackPlugin instance
const htmlWebpackPlugin = webpackConfig.plugins.find(
(plugin) => plugin.constructor.name === 'HtmlWebpackPlugin'
);
if (htmlWebpackPlugin) {
htmlWebpackPlugin.options.templateParameters = (compilation, assets, tags, options) => ({
compilation,
webpackConfig: compilation.options,
htmlWebpackPlugin: {
tags,
files: assets,
options
},
PUBLIC_URL: process.env.PUBLIC_URL || '',
REACT_APP_DEPLOYMENT_URL: process.env.REACT_APP_DEPLOYMENT_URL || '',
REACT_APP_LOGO_PATH: process.env.REACT_APP_LOGO_PATH || ''
});
}
return webpackConfig;
}
}
};Then update 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| <body> | ||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||
| <div id="root"></div> | ||
| <!-- | ||
| This HTML file is a template. | ||
| If you open it directly in the browser, you will see an empty page. | ||
|
|
||
|
|
@@ -56,5 +62,6 @@ | |
| To begin the development, run `npm start` or `yarn start`. | ||
| To create a production bundle, use `npm run build` or `yarn build`. | ||
| --> | ||
| </body> | ||
| </html> | ||
| </body> | ||
|
|
||
| </html> | ||
Uh oh!
There was an error while loading. Please reload this page.