Skip to content

Add book mode conference note example with TypeScript implementation #40

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

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 18, 2025

This PR adds a comprehensive TypeScript example for creating "book mode" conference notes using the HackMD API. Book mode is a Markdown note system that contains organized links to individual session notes, making it easy for conference attendees to navigate between different sessions.

What's Added

New Example: examples/book-mode-conference/

  • TypeScript Implementation: Full type safety with modern ES modules
  • tsx Support: Direct execution without compilation using npm start
  • Configurable Constants: All settings centralized at the top of the file for easy customization
  • Comprehensive Documentation: Detailed comments explaining each function and section
  • Sample Data: Realistic sessions.json with multi-day conference sessions
  • Error Handling: Graceful handling of API failures during bulk operations

Key Features Demonstrated

  1. Bulk Note Creation: Creates individual notes for each conference session
  2. Team Note Management: Uses HackMD team API for organized note creation
  3. Hierarchical Organization: Main book note organizes sessions by day and time
  4. Template System: Customizable note templates with embedded announcements
  5. Multilingual Support: Handles both English and Traditional Chinese sessions
  6. Permission Management: Sets appropriate read/write permissions for collaboration

Usage Example

// Configuration constants at the top
const ANNOUNCEMENT_NOTE = '@DevOpsDay/rkO2jyLMlg'
const TEAM_PATH = 'DevOpsDay'
const CONFERENCE_CONFIG = {
  name: 'DevOpsDays Taipei 2025',
  website: 'https://devopsdays.tw/',
  // ...
}

// Run with: npm start

The script creates:

  • Individual session notes with collaborative sections
  • A main conference book linking to all sessions
  • Organized navigation by day and time slots

Documentation

  • Comprehensive README: Setup instructions, configuration guide, and troubleshooting
  • Environment Configuration: .env.example with required API settings
  • TypeScript Configuration: Proper tsconfig.json for ES modules
  • Updated Main README: Added section describing the new example

This example showcases advanced HackMD API usage patterns including bulk operations, team note management, and creating interconnected note structures for conferences or events.

Fixes #39.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add create generic book mode conference note example under examples directory Add book mode conference note example with TypeScript implementation Jun 18, 2025
@Copilot Copilot AI requested a review from Yukaii June 18, 2025 09:49
Copilot finished work on behalf of Yukaii June 18, 2025 09:49
@Yukaii Yukaii marked this pull request as ready for review June 18, 2025 09:52
@Yukaii Yukaii merged commit 8a17d11 into develop Jun 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add create generic book mode conference note example under examples directory
2 participants