feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell

- Introduced blog routing using Next.js App Router
- Implemented dynamic [slug] pages for blog posts
- Added MDX-based content loading via lib/posts
- Integrated shared TopBar layout with navigation
- Established clear content, lib and component separation
This commit is contained in:
PascalSchattenburg
2026-01-22 14:14:15 +01:00
parent b717952234
commit d147843c76
10412 changed files with 2475583 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import { type CompilerNameValues } from '../../shared/lib/constants';
export declare const edgeConditionName = "edge-light";
export declare function getMainField(compilerType: CompilerNameValues, preferEsm: boolean): string[];

View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
edgeConditionName: null,
getMainField: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
edgeConditionName: function() {
return edgeConditionName;
},
getMainField: function() {
return getMainField;
}
});
const _constants = require("../../shared/lib/constants");
const edgeConditionName = 'edge-light';
const mainFieldsPerCompiler = {
// For default case, prefer CJS over ESM on server side. e.g. pages dir SSR
[_constants.COMPILER_NAMES.server]: [
'main',
'module'
],
[_constants.COMPILER_NAMES.client]: [
'browser',
'module',
'main'
],
// For bundling-all strategy, prefer ESM over CJS
'server-esm': [
'module',
'main'
]
};
function getMainField(compilerType, preferEsm) {
if (compilerType === _constants.COMPILER_NAMES.edgeServer) {
return [
'edge-light',
'...'
];
} else if (compilerType === _constants.COMPILER_NAMES.client) {
return mainFieldsPerCompiler[_constants.COMPILER_NAMES.client];
}
// Prefer module fields over main fields for isomorphic packages on server layer
return preferEsm ? mainFieldsPerCompiler['server-esm'] : mainFieldsPerCompiler[_constants.COMPILER_NAMES.server];
}
//# sourceMappingURL=resolve.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/webpack-config-rules/resolve.ts"],"sourcesContent":["import {\n COMPILER_NAMES,\n type CompilerNameValues,\n} from '../../shared/lib/constants'\n\nexport const edgeConditionName = 'edge-light'\n\nconst mainFieldsPerCompiler = {\n // For default case, prefer CJS over ESM on server side. e.g. pages dir SSR\n [COMPILER_NAMES.server]: ['main', 'module'],\n [COMPILER_NAMES.client]: ['browser', 'module', 'main'],\n // For bundling-all strategy, prefer ESM over CJS\n 'server-esm': ['module', 'main'],\n}\n\nexport function getMainField(\n compilerType: CompilerNameValues,\n preferEsm: boolean\n) {\n if (compilerType === COMPILER_NAMES.edgeServer) {\n return ['edge-light', '...']\n } else if (compilerType === COMPILER_NAMES.client) {\n return mainFieldsPerCompiler[COMPILER_NAMES.client]\n }\n\n // Prefer module fields over main fields for isomorphic packages on server layer\n return preferEsm\n ? mainFieldsPerCompiler['server-esm']\n : mainFieldsPerCompiler[COMPILER_NAMES.server]\n}\n"],"names":["edgeConditionName","getMainField","mainFieldsPerCompiler","COMPILER_NAMES","server","client","compilerType","preferEsm","edgeServer"],"mappings":";;;;;;;;;;;;;;;IAKaA,iBAAiB;eAAjBA;;IAUGC,YAAY;eAAZA;;;2BAZT;AAEA,MAAMD,oBAAoB;AAEjC,MAAME,wBAAwB;IAC5B,2EAA2E;IAC3E,CAACC,yBAAc,CAACC,MAAM,CAAC,EAAE;QAAC;QAAQ;KAAS;IAC3C,CAACD,yBAAc,CAACE,MAAM,CAAC,EAAE;QAAC;QAAW;QAAU;KAAO;IACtD,iDAAiD;IACjD,cAAc;QAAC;QAAU;KAAO;AAClC;AAEO,SAASJ,aACdK,YAAgC,EAChCC,SAAkB;IAElB,IAAID,iBAAiBH,yBAAc,CAACK,UAAU,EAAE;QAC9C,OAAO;YAAC;YAAc;SAAM;IAC9B,OAAO,IAAIF,iBAAiBH,yBAAc,CAACE,MAAM,EAAE;QACjD,OAAOH,qBAAqB,CAACC,yBAAc,CAACE,MAAM,CAAC;IACrD;IAEA,gFAAgF;IAChF,OAAOE,YACHL,qBAAqB,CAAC,aAAa,GACnCA,qBAAqB,CAACC,yBAAc,CAACC,MAAM,CAAC;AAClD","ignoreList":[0]}