InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.08k stars 718 forks source link

Online documentation links are broken #1767

Closed NinoDLC closed 8 months ago

NinoDLC commented 9 months ago

Describe the bug Online documentation links are broken

To Reproduce Steps to reproduce the behavior:

Expected behavior Not a 404

geoffreylgv commented 9 months ago

Hi @NinoDLC, no link is broken there though Please, @arnaudgiuliani @marcellogalhardo @pedrofsn, can you confirm ?

NinoDLC commented 9 months ago

I guess I must be clicking stuff incorrectly then 😁 https://github.com/InsertKoinIO/koin/assets/11870220/a123eef5-f631-46ab-9256-d01c9aae5a98

geoffreylgv commented 9 months ago

I guess I must be clicking stuff incorrectly then 😁 https://github.com/InsertKoinIO/koin/assets/11870220/a123eef5-f631-46ab-9256-d01c9aae5a98

[!IMPORTANT] I got it @NinoDLC, but it seems like someway it's correct and returning the expected page, and in another way it returns 404

Check these videos

200 oK

https://github.com/InsertKoinIO/koin/assets/52314615/65a46527-239c-4af9-952a-27fc14d23159

404 not Found

https://github.com/InsertKoinIO/koin/assets/52314615/32e52fd6-7e7b-44ea-bbc8-e13c32fb5117

arnaudgiuliani commented 9 months ago

did you tried refreshing this setup page? Seems all link got to tutorials section. Perhaps a cache problem? 🤔

geoffreylgv commented 9 months ago

did you tried refreshing this setup page? Seems all link got to tutorials section. Perhaps a cache problem? 🤔

Yes @arnaudgiuliani, I refreshed the setup page several times; and also, it's not a cache problem

When I take a look at the doc the koin file here image

Clicking on the next link to see, It's 404, even on the GitHub repo,

image

There is no place you can find the page referenced

NinoDLC commented 9 months ago

Yes, even refreshing, using a different browser (Firefox),using incognito mode... same issue.

arnaudgiuliani commented 9 months ago

Go on https://insert-koin.io/docs/setup/koin, click again on setup in the menu. And you can click on the links to follow tutorials.

But agree, there is something wrong in the lings 🤔

geoffreylgv commented 9 months ago

Please @arnaudgiuliani, where are located the tutorial markdown files ?

arnaudgiuliani commented 9 months ago

it's located here: https://github.com/InsertKoinIO/koin-getting-started/tree/main/docs perhaps website is out of sync? 🤔

geoffreylgv commented 9 months ago

it's located here: https://github.com/InsertKoinIO/koin-getting-started/tree/main/docs perhaps website is out of sync? 🤔

Alright, I see; this means it's called from another repo. What do you think @arnaudgiuliani if I add the direct link (Absolute paths) instead of the relative one that is there actually?

Example


title: Koin

All you need to setup Koin in your project

Current Versions

You can find all Koin packages on maven central.

Here are the currently available versions:

Project Version
koin-core Maven Central
koin-core-coroutines Maven Central
koin-test Maven Central
koin-android Maven Central
koin-android-test Maven Central
koin-android-compat Maven Central
koin-androidx-navigation Maven Central
koin-androidx-workmanager Maven Central
koin-compose Maven Central
koin-androidx-compose Maven Central
koin-androidx-compose-navigation Maven Central
koin-ktor Maven Central
koin-logger-slf4j Maven Central

Gradle Setup

Kotlin

Starting from 3.5.0 you can use BOM-version to manage all Koin library versions. When using the BOM in your app, you don't need to add any version to the Koin library dependencies themselves. When you update the BOM version, all the libraries that you're using are automatically updated to their new versions.

Add koin-bom BOM and koin-core dependency to your application:

implementation(platform("io.insert-koin:koin-bom:$koin_version"))
implementation("io.insert-koin:koin-core")

If you are using version catalogs:

[versions]
koin-bom = "x.x.x"
...

[libraries]
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "di-koin" }
koin-core = { module = "io.insert-koin:koin-core" }
...
dependencies {
    implementation(libs.koin.bom)
    implementation(libs.koin.core)
}

Or use an old way of specifying the exact dependency version for Koin:

dependencies {
    implementation("io.insert-koin:koin-core:$koin_version")
}

You are now ready to start Koin:

fun main() {
    startKoin {
        modules(...)
    }
}

If you need testing capacity:

dependencies {
    // Koin Test features
    testImplementation("io.insert-koin:koin-test:$koin_version")
    // Koin for JUnit 4
    testImplementation("io.insert-koin:koin-test-junit4:$koin_version")
    // Koin for JUnit 5
    testImplementation("io.insert-koin:koin-test-junit5:$koin_version")
}

:::info From now you can continue on Koin Tutorials to learn about using Koin: Kotlin App Tutorial :::

Android