fix: Update Astro config and Knowledge Graph component
This commit is contained in:
parent
beeb1bae43
commit
65714609cc
|
@ -7,9 +7,9 @@ import tailwind from '@astrojs/tailwind';
|
|||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://laforceit-blog.pages.dev', // Your current Cloudflare site
|
||||
site: 'https://laforceit.com/blog', // ✅ Real production location
|
||||
base: '/blog', // ✅ Add this line
|
||||
output: 'static',
|
||||
// adapter: cloudflare(), // Commented out for local development
|
||||
integrations: [
|
||||
mdx(),
|
||||
sitemap(),
|
||||
|
@ -23,8 +23,8 @@ export default defineConfig({
|
|||
remarkPlugins: [],
|
||||
rehypePlugins: []
|
||||
},
|
||||
compressHTML: false, // Disable HTML compression to avoid parsing errors
|
||||
compressHTML: false,
|
||||
build: {
|
||||
format: 'file', // Use 'file' instead of 'directory' format
|
||||
format: 'file',
|
||||
}
|
||||
});
|
|
@ -187,7 +187,7 @@ graphData.nodes.forEach(node => {
|
|||
// Post node style
|
||||
{ selector: 'node[type="post"]', style: { 'background-color': 'data(color)', 'shape': 'ellipse' } },
|
||||
// Tag node style
|
||||
{ selector: 'node[type="tag"]', style: { 'background-color': 'data(color)', 'shape': 'round-rectangle', 'font-size': '9px', 'text-margin-y': '5px' } }, // Slightly smaller font for tags
|
||||
{ selector: 'node[type="tag"]', style: { 'background-color': 'data(color)', 'shape': 'diamond', 'font-size': '9px', 'text-margin-y': '5px', 'border-color': 'data(color)' } }, // Diamond shape, use color for border too
|
||||
// Base edge style
|
||||
{ selector: 'edge', style: { 'width': '1px', 'line-color': 'rgba(226, 232, 240, 0.2)', 'curve-style': 'bezier', 'opacity': 0.6, 'z-index': 1 } },
|
||||
// Highlighted state (for nodes and edges)
|
||||
|
@ -270,10 +270,9 @@ graphData.nodes.forEach(node => {
|
|||
document.getElementById('zoom-in')?.addEventListener('click', () => cy.zoom(cy.zoom() * 1.2));
|
||||
document.getElementById('zoom-out')?.addEventListener('click', () => cy.zoom(cy.zoom() / 1.2));
|
||||
document.getElementById('reset-graph')?.addEventListener('click', () => {
|
||||
cy.fit(null, 30);
|
||||
cy.elements().removeClass('faded highlighted filtered');
|
||||
const allFilterButton = document.querySelector('.graph-filter[data-filter="all"]');
|
||||
if (allFilterButton) allFilterButton.click();
|
||||
cy.fit(null, 30); // Fit the graph to the viewport with padding
|
||||
cy.elements().removeClass('faded highlighted'); // Remove visual states
|
||||
// Note: We removed category filters, so no need to click the 'all' filter button here
|
||||
});
|
||||
|
||||
// Add mouse wheel zoom controls
|
||||
|
|
Loading…
Reference in New Issue