Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ólafur Páll Geirsson
    @olafurpg
    images often make the repo large to clone, and once you have committed the image it’s part of the history forever even after the docs stop referencing the image
    Mike Limansky
    @limansky
    @olafurpg thanks for reply. I got your point, but on the other hand, committing images keeps history consistent, and it is always possible to restore the site on some commit. Also, I don't think we'll have a lot of images, that's why I think it would be better to keep all in one place. The only solution I came up with (but not implemented yet), is to copy assets via sbt task to a subfolder of website/static which have to be added to .gitignore. I just asking if there something better than this, or some built-in code for it.
    Ólafur Páll Geirsson
    @olafurpg
    @limansky can you place the images directly under website/static?
    Alternatively, mdoc does support multiple in/out pair of directories.
    Mike Limansky
    @limansky
    Well, I'd like to separate content and template.
    Ólafur Páll Geirsson
    @olafurpg
    It can only be used from the sbt plugin by configuring extra cli arguments. You pass in extra —in and —out flags
    But not sure how that can help
    Mike Limansky
    @limansky
    ok :)
    Chris Stewart
    @Christewart
    has anyone had problems with mdoc and accumulating ever growing git history? Our repo takes forever to clone because it apperas things keep getting added to the docs/ folder on every merge
    1 reply
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    How's your build set up? I never check in the results of mdoc generation
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    mdoc itself doesn't generate html files, are you sure it's not unidoc's API files?
    also - I'm guessing you're referring to gh-pages branch?
    because mdoc doesn't check anything in either.
    Chris Stewart
    @Christewart
    It could
    Chris Stewart
    @Christewart
    Does unidoc even require it's own brancy anymore? I haven't looked at this in forever
    It seems that docusraus (which mdoc uses) is the thing publishing to the gh pages branch? https://github.com/bitcoin-s/bitcoin-s/tree/gh-pages
    Nishant Vishwakarma
    @nishantv12

    I was trying to explore mdoc in a sample project following the documentation. I have added the plugin in plugins.sbt and created two projects in build.sbt where docuemntation project depends on my root project as given in the documentation. However, when I run docs/mdoc I get error for dependency resolution as mdoc is looking for 2.12 version of the project but I am using 2.13.

    addSbtPlugin("org.scalameta" %% "sbt-mdoc" % "2.2.21")
    lazy val `sample-project` = project
      .in(file("."))
      .settings(
          name := "sample-project",
          version := "0.1",
          scalaVersion := "2.13.3"
      )
    lazy val docs = project       // new documentation project
      .in(file("myproject-docs")) // important: it must not be docs/
      .settings(
        mdocVariables := Map("VERSION" -> version.value, "SCALA_VERSION" -> "2.13.3")
      )
      .dependsOn(`sample-project`)
      .enablePlugins(MdocPlugin)

    What am I missing?

    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    SBT will set it to 2.12 by default
    I think you need to explicitly set scalaVersion to 2.13.13 on the docs project as well
    Tomasz Godzik
    @tgodzik
    @velvetbaldmime:matrix.org that's exactly true
    Nishant Vishwakarma
    @nishantv12
    Thanks @velvetbaldmime:matrix.org and @tgodzik.
    Nishant Vishwakarma
    @nishantv12
    Does mdoc have a feature to refer snippets from scala files? Something like snip block from paradox?
    Ólafur Páll Geirsson
    @olafurpg
    @nishantv12 there's nothing built-in, but you can implement it yourself with a custom modifier
    it would be nice to provide something like this built-in, but I didn't want to open source the implemenation in the mdoc repo because it hardcodes github
    we might need to provide a few different modifiers to accommodate different needs (link to github, just inline contents, select specific lines from the file, ...)
    instead of figuring out how to expose all that configuration it ended up being easier to ask users to roll their own implementation.
    Tomas Herman
    @tomasherman

    Hi everyone, i was wondering if anyone is using mdoc with scala3 ... im running into this issue where im trying to use scala3 syntax in mdoc but for some reason it's failing on this:

    error: /Users/tomas.herman/workspace/datadog4s/site/docs/userguide.md:180:41:
    `_` is no longer supported for a wildcard import; use `*` instead
    This construct can be rewritten automatically under -rewrite -source future-migration.
    import com.avast.datadog4s.extension.jvm.*

    Basically it's complaining about _ not being supported and forcing me to use *, which is fine ... but i'm already using *!

    Any ideas why that is?

    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]

    @tomasherman: the scala 3 support is supper new and you might be the first person to actually test it :) is this issue minimizable or at least somewhere I can take a look at a reproduction?

    I'm asking because the code generator for Scala 3 is new and different, so it may as well have problems

    Jack Koenig
    @jackkoenig
    I tend to keep burning myself by accidentally having a space between the triple backticks and scala, is there a way to warn on this?
    Ólafur Páll Geirsson
    @olafurpg
    @jackkoenig i estimate it would be easy to report a warning for this
    felher
    @felher

    Hey folks.

    Is there Mdoc-Syntax to get your input from a file? Instead of

    '''scala
    // this is inline scala content
    '''

    something like

    '''scala-from "../src/main/scala/SomeFile.scala", start:130, end:150
    '''
    Ólafur Páll Geirsson
    @olafurpg
    @felher theres a related discussion if you scroll a few messages up
    May 21st
    felher
    @felher
    @olafurpg Thanks, I'll take a look. Sorry, I just can't figure out the gitter search :)
    felher
    @felher
    @olafurpg Okay, took me a while to get how to do custom modifiers, but it now works like a charm. Thank you!
    RAJKUMAR NATARAJAN
    @rajcspsg
    Hi guys
    I'm migrating tut plugin to mdoc plugin
    I've below settings while using the tut plugin
    tutNameFilter := """.*\.(md|json|css|html)""".r
    when using mdoc plugin, I've settings as below
    mdoc / include := """.*\.(md|json|css|html)""".r
    When I run sbt docs/mdoc, I get below error

    /Users/rajkumar.natarajan/Documents/Coding/OS/reftree/build.sbt:121: error: not found: value include

    mdoc / include := """.*.(md|json|css|html)""".r,

          ^

    sbt.compiler.EvalException: Type error in expression

    what is wrong with my new settings?
    Bill Frasure
    @swoogles
    Hey Folks, are there any tips to trick Intellij into treating fenced Scala Mdoc snippets as plain Scala snippets?
    When I have plain scala in my snippets, I get syntax highlighting and autocomplete, but when I use scala mdoc... I get all the cool features of mdoc, but lose the basic Scala features in the IDE
    Ólafur Páll Geirsson
    @olafurpg
    @swoogles might be worth reporting to intellij. Syntax highlighting works in VS Code
    Bill Frasure
    @swoogles
    Thanks @olafurpg