This document records the specific migration steps taken to update this repository to use the latest book-publishing-template.
Date: 2025-06-19
From: Python-based build system
To: Node.js-based book-publishing-template (v1.2.0+ with README generation)
- Created
package.jsonwith all template scripts - Installed npm dependencies
- Added Node.js entries to
.gitignore
book-config.json: Centralized book configuration.markdownlint.json: Markdown linting rulescspell.json: Spell check configuration with Japanese terms- Updated
_config.ymlto template format
- Copied essential build scripts from template (including updated build.js with README generation)
- Created
build-adapter.jsto handle flat file structure - Created Python wrapper scripts:
python-wrapper.js: Generic Python script runnerpublish-to-zenn.js: Zenn publishing integrationpython-build-adapter.js: Python build integration
- Added
templates/directory - Created customized
book-readme.mdtemplate specific to this book - Template includes full chapter structure and book features
- Kept all Python scripts in
scripts/directory - Added npm scripts to run Python commands:
npm run python:buildnpm run python:publishnpm run python:validatenpm run python:metricsnpm run publish:zenn
# Building
npm run build # Build with adapter (handles flat structure)
npm run build:incremental # Faster incremental builds
npm run build:parallel # Parallel processing build
# Development
npm run dev # Start hot reload dev server
npm run preview # Build and preview
# Quality Checks
npm run check:all # Run all checks
npm run check:markdown # Lint markdown
npm run check:spelling # Spell check
npm run check:links # Validate links
# Deployment
npm run deploy # Deploy to GitHub Pages
npm run setup:deploy # Configure deployment
npm run setup:secrets # Set up GitHub Actions secrets
# Python Integration
npm run python:build # Run Python build script
npm run publish:zenn # Publish to Zenn platform
# Version Management
npm run version:create # Create new version
npm run version:list # List all versionsSince this repository uses a flat structure (chapters in root), the build-adapter.js temporarily creates the expected src/ structure during build:
Root files: Temporary src/ structure:
chapter-01-*.md → src/chapters/chapter01/index.md
chapter-02-*.md → src/chapters/chapter02/index.md
appendix-a-*.md → src/appendices/appendix-a/index.md
README.md → src/introduction/index.md
✅ Build completed successfully with:
- 1 introduction file
- 16 chapter files
- 7 appendix files
- Table of contents generated
- Images optimized
- NEW: Professional README.md generated from template
- Sensitive content patterns found in some chapters (API keys, passwords, emails)
- These appear to be example/demo content and should be reviewed
- Review sensitive content warnings and ensure no real credentials are exposed
- Set up deployment:
npm run setup:deploy npm run setup:secrets
- Test all quality checks:
npm run check:all
- Configure GitHub Actions for automated builds
- Consider migrating Python scripts to JavaScript for full integration
If you need to rollback to the Python-only system:
-
Keep using the Python scripts directly:
cd scripts python build_book.py python publication_manager.py -
The following files can be safely removed:
package.jsonpackage-lock.jsonnode_modules/book-config.json.markdownlint.json- New files in
scripts/(except Python files)
-
Restore original
_config.ymlfrom git history
- Performance: Incremental builds now available
- Development: Hot reload server for instant preview
- Quality: Automated linting and spell checking
- Standardization: Same workflow as other ITDO book projects
- Future-proofing: Easy updates from template repository
- Professional presentation: Auto-generated README for public repository with full book structure