Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinvandenbreemen committed Nov 20, 2023
1 parent ee95ffd commit 412c42b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ WikiApplication.macroRegistry.register(myMacro)
At the moment this is done in the WikiApplication.kt file.

#### Data Storage in Macros
You'll note that the ```Macro``` interface's ```execute()``` method includes a ```SystemAccessInteractor``` argument. You can use this to store or retrieve data when your macro executes.
You'll note that the ```Macro``` interface's ```execute()``` method includes a ```SystemAccess``` argument. You can use this to store or retrieve data when your macro executes.

## Custom CSS
You can customize the css for the wiki by updating the styling for the appropriate section of each page on the main screen (by going to ```/``` on the wiki). Note that for now css classes are used to control most of the styling. So, for example, the body of a wiki entry being displayed falls under css class ```.wiki_entry```. You can extend this system by adding more classes (see the ```Classes``` class). If you wish to make a given css class customizable simply add an entry for it to the StylesheetType enum, and provide the css class you wish to make customizable as constructor argument, as in:
Expand All @@ -59,9 +59,9 @@ enum class StylesheetType(val cssClass: String) {
```

# Storage and Configuration
You can use the ```WikiApplication.systemAccessInteractor``` field to get a ```SystemAccessInteractor``` that lets you store data should you need to store or retrieve configurations etc.
You can use the ```WikiApplication.systemAccess``` field to get a ```SystemAccess``` that lets you store data should you need to store or retrieve configurations etc.

Generally, if you are modifying or maintaining this project, the SystemAccessInteractor should provide only a minimal set of features. This allows for the rest of the application to function smoothly without say someone's third party code messing around with wiki pages in the database.
Generally, if you are modifying or maintaining this project, the SystemAccess should provide only a minimal set of features. This allows for the rest of the application to function smoothly without say someone's third party code messing around with wiki pages in the database.

# Libraries Used
## ktt
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/com/vandenbreemen/ktt/main/WikiApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.vandenbreemen.ktt.web.startServer
object WikiApplication {

private val repository = SQLiteWikiRepository(("main.db"))
val systemAccessInteractor: SystemAccess = SystemAccessInteractor(repository)
val systemAccess: SystemAccess = SystemAccessInteractor(repository)

private val pageRenderingPluginRegistry: PageRenderingPluginRegistry by lazy {
PageRenderingPluginRegistry()
Expand All @@ -29,7 +29,7 @@ object WikiApplication {
@JvmStatic
val macroRegistry: MacroRegistry by lazy {
MacroRegistry().also {
pageRenderingPluginRegistry.register(MacrosPlugin(it, systemAccessInteractor))
pageRenderingPluginRegistry.register(MacrosPlugin(it, systemAccess))
it.register(MacroRegistryMacro(it))
}
}
Expand Down

0 comments on commit 412c42b

Please sign in to comment.