Skip to content

Commit

Permalink
move to starlight
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Jan 5, 2025
1 parent 58e47c6 commit 2501b67
Show file tree
Hide file tree
Showing 20 changed files with 97 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,17 @@ on:
branches: ["main"]
workflow_dispatch:

env:
INSTANCE: 'Writerside/doc'
ARTIFACT: 'webHelpDOC2-all.zip'
DOCKER_VERSION: '243.22562'

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
fetch-depth: 0

- uses: JetBrains/writerside-github-action@5a6920dbce3ef3169acbeb7e45c6cbdaf7e76bfa #v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
- run: |
export JAVA_HOME=$JAVA_HOME_21_X64 # Remove when ubuntu-latest updates to Java 21
./gradlew librarianStaticContent
find Writerside
unzip artifacts/${{ env.ARTIFACT }} -d build/static
- uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2 #v4.6.3
with:
branch: gh-pages # The branch the action should deploy to.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2024 GradleUp developers
Copyright (c) 2016-2025 GradleUp developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 0 additions & 6 deletions Writerside/c.list

This file was deleted.

16 changes: 0 additions & 16 deletions Writerside/cfg/buildprofiles.xml

This file was deleted.

14 changes: 0 additions & 14 deletions Writerside/doc.tree

This file was deleted.

1 change: 0 additions & 1 deletion Writerside/topics/cli.md

This file was deleted.

1 change: 0 additions & 1 deletion Writerside/topics/libraries.md

This file was deleted.

6 changes: 0 additions & 6 deletions Writerside/v.list

This file was deleted.

8 changes: 0 additions & 8 deletions Writerside/writerside.cfg

This file was deleted.

16 changes: 16 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,19 @@ buildscript {
}

Librarian.root(project)

tasks.register("librarianBuildDocs", Exec::class.java) {
enabled = file("docs").exists()

commandLine("npm", "run", "build")
workingDir("docs")
}

tasks.named("librarianStaticContent").configure {
dependsOn("librarianBuildDocs")

val from = file("docs/dist")
doLast {
from.copyRecursively(outputs.files.single(), overwrite = true)
}
}
35 changes: 21 additions & 14 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,33 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
title: 'Librarian',
editLink: {
baseUrl: 'https://github.com/GradleUp/librarian/edit/main/docs/',
},
logo: {
src: './src/assets/logo.svg'
},
social: {
github: 'https://github.com/withastro/starlight',
github: 'https://github.com/GradleUp/librarian',
},
sidebar: [
{
label: 'Guides',
items: [
// Each item here is one entry in the navigation menu.
{ label: 'Example Guide', slug: 'guides/example' },
],
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
},
{ label: 'Welcome', link: '/', },
{ label: 'CLI', link: '/cli' },
// {
// label: 'Guides',
// items: [
// // Each item here is one entry in the navigation menu.
// { label: 'Example Guide', slug: 'guides/example' },
// ],
// },
// {
// label: 'Reference',
// autogenerate: { directory: 'reference' },
// },
],
}),
],
Expand Down
16 changes: 15 additions & 1 deletion docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/src/assets/houston.webp
Binary file not shown.
15 changes: 15 additions & 0 deletions docs/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/src/content/docs/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: CLI
---

# CLI
11 changes: 0 additions & 11 deletions docs/src/content/docs/guides/example.md

This file was deleted.

44 changes: 24 additions & 20 deletions Writerside/topics/welcome.md → docs/src/content/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
# Welcome
---
title: Welcome to Librarian
---

Librarian is an opinionated toolkit to build Kotlin libraries.
Librarian is an opinionated toolkit to build Kotlin libraries.

> This project is work in progress
{style=info}
:::note
This project is work in progress

:::

Librarian:

* publishes your KMP/Android/JVM libraries to:
* Maven Central using [default host](https://central.sonatype.org/publish/publish-guide/#releasing-to-central)
* Maven Central using [S01 host](https://central.sonatype.org/publish/publish-guide/#releasing-to-central)
* Maven Central using [the central portal API](https://central.sonatype.com/api-doc)
* OSS Sonatype snapshots using the default host
* OSS Sonatype snapshots using the S01 host
* [Google Cloud Storage](https://cloud.google.com/storage?hl=en)
* GitHub pages snapshots
* generates versioned KDoc using [Dokka](https://github.com/Kotlin/dokka)
* Maven Central using [default host](https://central.sonatype.org/publish/publish-guide/#releasing-to-central)
* Maven Central using [S01 host](https://central.sonatype.org/publish/publish-guide/#releasing-to-central)
* Maven Central using [the central portal API](https://central.sonatype.com/api-doc)
* OSS Sonatype snapshots using the default host
* OSS Sonatype snapshots using the S01 host
* [Google Cloud Storage](https://cloud.google.com/storage?hl=en)
* GitHub pages snapshots
* generates versioned KDoc using [Dokka](https://github.com/Kotlin/dokka)
* automates your workflows using GitHub actions:
* pull requests
* documentation
* SNAPSHOTs
* releases
* pull requests
* documentation
* SNAPSHOTs
* releases
* generates a Kotlin property holding your library version
* monitors your binary compatibility using Kotlin Binary Compatibility validator
* configures Java and Kotlin compatibility
* monitors your binary compatibility using Kotlin Binary Compatibility validator
* configures Java and Kotlin compatibility
* ensure your libs can be consumed with maven
* manages your changelog
* and more!

This is a lot of things for a single tool, and a lot of opinions too!
This is a lot of things for a single tool, and a lot of opinions too!

Because every lib is different and opinions may differ, Librarian is also shipped as low level libraries that you can use on a case by case basis.
Because every lib is different and opinions may differ, Librarian is also shipped as low level libraries that you can use on a case by case basis.

Just want the publishing without the GitHub workflows, use `librarian-publishing`. Just want maven sympathy, use `librarian-maven-sympathy`, etc... For more information, read the [libraries page](libraries.md).

Expand Down
36 changes: 0 additions & 36 deletions docs/src/content/docs/index.mdx

This file was deleted.

11 changes: 0 additions & 11 deletions docs/src/content/docs/reference/example.md

This file was deleted.

Binary file added graphics/logo.sketch
Binary file not shown.

0 comments on commit 2501b67

Please sign in to comment.