-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Finish build settings * Add in ScalaFmt * Make 2 themes we plan to support * Integrate theme selection into HugoPass
- Loading branch information
reidspencer
committed
Mar 29, 2024
1 parent
88a3db0
commit d2e1c38
Showing
8 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
hugo/src/main/scala/com/ossuminc/riddl/hugo/themes/DotdockTheme.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.ossuminc.riddl.hugo.themes | ||
|
||
import com.ossuminc.riddl.hugo.{MarkdownWriter, PassUtilities} | ||
import com.ossuminc.riddl.language.CommonOptions | ||
import com.ossuminc.riddl.passes.resolve.{ReferenceMap, Usages} | ||
import com.ossuminc.riddl.passes.symbols.SymbolsOutput | ||
|
||
import java.nio.file.Path | ||
|
||
object DotdockTheme { | ||
val name = "DotDock" | ||
} | ||
|
||
/** Theme extensions to the Markdown writer for the Dotdock Hugo theme | ||
* | ||
* @param filePath | ||
* Path to the file being written | ||
* @param commonOptions | ||
* The common options to consider when writing | ||
* @param symbolsOutput | ||
* The symbol table | ||
* @param refMap | ||
* The reference map for looking up references | ||
* @param usage | ||
* The usage statistics | ||
* @param passUtilities | ||
* The PassUtilities from running the various passes | ||
*/ | ||
case class DotdockTheme( | ||
filePath: Path, | ||
commonOptions: CommonOptions, | ||
symbolsOutput: SymbolsOutput, | ||
refMap: ReferenceMap, | ||
usage: Usages, | ||
passUtilities: PassUtilities | ||
) extends MarkdownWriter(filePath, commonOptions, symbolsOutput, refMap, usage, passUtilities) { | ||
final val name: String = DotdockTheme.name | ||
} |
24 changes: 21 additions & 3 deletions
24
hugo/src/main/scala/com/ossuminc/riddl/hugo/themes/GeekDocTheme.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
package com.ossuminc.riddl.hugo.themes | ||
|
||
import com.ossuminc.riddl.hugo.MarkdownWriter | ||
import com.ossuminc.riddl.hugo.{MarkdownWriter, PassUtilities} | ||
import com.ossuminc.riddl.language.CommonOptions | ||
import com.ossuminc.riddl.passes.resolve.{ReferenceMap, Usages} | ||
import com.ossuminc.riddl.passes.symbols.SymbolsOutput | ||
|
||
case class GeekDocTheme(mdw: MarkdownWriter) extends ThemeWriter(mdw) { | ||
def name: String = "GeekDoc" | ||
import java.nio.file.Path | ||
|
||
object GeekDocTheme { | ||
val name: String = "GeekDoc" | ||
} | ||
|
||
/** Theme extension to the MardownWriter for the Hugo GeekDoc theme */ | ||
case class GeekDocTheme( | ||
filePath: Path, | ||
commonOptions: CommonOptions, | ||
symbolsOutput: SymbolsOutput, | ||
refMap: ReferenceMap, | ||
usage: Usages, | ||
passUtilities: PassUtilities | ||
) extends MarkdownWriter(filePath, commonOptions, symbolsOutput, refMap, usage, passUtilities) with ThemeWriter { | ||
|
||
def themeName: String = GeekDocTheme.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters