이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

SavingMechanism

2016년 7월 9일 오전 11:27

The SavingMechanism is the mechanism by which TiddlyWiki generates a new HTML file and stores it. It is different from the sync mechanism, which is concerned with synchronising changes to individual tiddlers back to a server (see https://tiddlywiki.com/dev/#SyncAdaptorModules for more details).

The following steps are involved:

  1. The saver mechanism uses the filter defined in $:/config/SaverFilter to specify which modified tiddlers trigger the dirty state for the wiki. (The dirty state is reflected in the red colouring of the "save changes" button in the sidebar).
  2. The ButtonWidget is used to generate a tm-save-wiki message to trigger the save operation
  3. The optional parameter for the message specifies the template that will be used for generating the HTML file, defaulting to $:/core/save/all
  4. The template includes a variable assignment that specifies a filter to select the tiddlers that should be included in the saved file. It then transcludes the main page template $:/core/templates/tiddlywiki5.html
    • The template includes a reference to $(publishFilter)$ that allows the filter to be customised via a global variable
  5. The tm-save-wiki handler renders the template to generate the HTML file
  6. The message handler chooses the highest priority "saver" module that can handle saving the file