Skip to content

Add Conference Dynamic Variable Substitution in Markdown - #73

Closed
zhouyijun111 wants to merge 1 commit into
mainfrom
feature/conference-markdown-template-vars
Closed

zhouyijun111 wants to merge 1 commit into
mainfrom
feature/conference-markdown-template-vars

Conversation

@zhouyijun111

Copy link
Copy Markdown

Summary

This PR adds conference-scoped markdown template variables to splash-page content and improves discoverability of available variables in admin.

Implemented

  • Added ConferenceMarkdownTemplate service to interpolate {token} placeholders for conference-facing markdown.
  • Reused existing email-template substitution style and added conference aliases:
    • {conference_name} -> {conference}
    • {short_name} -> {conference_short}
    • {cfp_deadline} -> {cfp_end_date}
  • Added fallback replacement for known keys so optional empty values do not leave raw {...} tokens in rendered output.
  • Added conference_template_markdown helper and integrated it into app helpers.
  • Updated splash rendering to apply interpolation before markdown for:
    • conference description
    • registered attendees message
  • Updated admin conference form variable-help UI to email-style clickable blue links (Show available template variables).
  • Fixed missing-splashpage redirect flow in ConferencesController#show to avoid nil splashpage rendering path.
  • Added regression/service specs for interpolation behavior and redirect behavior.

Changed Files

  • app/services/conference_markdown_template.rb
  • app/helpers/conference_template_helper.rb
  • app/helpers/application_helper.rb
  • app/views/conferences/_about_and_happening_now.haml
  • app/views/admin/conferences/_form_fields.html.haml
  • app/controllers/conferences_controller.rb
  • app/views/conferences/_header.haml
  • spec/services/conference_markdown_template_spec.rb
  • spec/controllers/conferences_controller_spec.rb

Test Plan

  • bundle exec rspec spec/services/conference_markdown_template_spec.rb
  • bundle exec rspec spec/controllers/conferences_controller_spec.rb:30
  • Manual check: placeholders in conference description render correctly on /conferences/:short_title
  • Manual check: optional missing values do not leave raw tokens
  • Manual check: admin variable-help links are visible and toggle correctly

Screenshot

b9d7da5f0b990cd507cf887301362773

Example: Description + Corresponding Splash-Page
ddae18b1dca1f3d1811622eaf15bd585
3c187e874e61de85d5492119fec76054

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.

1 participant