Skip to content

Commit fe819bf

Browse files
authored
Merge pull request #12895 from BarkingBad/backport-ci-fixes
Backport ci fixes
2 parents 0c8bb6c + 524a079 commit fe819bf

File tree

15 files changed

+181
-14
lines changed

15 files changed

+181
-14
lines changed

docs/blog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1>{{ page.title }}</h1>
99
{% for post in site.posts %}
1010
<li>
1111
<h2>
12-
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
12+
<a href="{{ post.url }}">{{ post.title }}</a>
1313
</h2>
1414
<div class="byline">
1515
<time class="date">

project/Build.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,13 @@ object Build {
12521252
// TODO add versions etc.
12531253
def srcManaged(v: String, s: String) = s"out/bootstrap/stdlib-bootstrapped/scala-$v/src_managed/main/$s-library-src"
12541254
def scalaSrcLink(v: String, s: String) = s"-source-links:$s=github://scala/scala/v$v#src/library"
1255-
def dottySrcLink(v: String, s: String) = s"-source-links:$s=github://lampepfl/dotty/$v#library/src"
1255+
def dottySrcLink(v: String, s: String) =
1256+
sys.env.get("GITHUB_SHA") match {
1257+
case Some(sha) =>
1258+
s"-source-links:$s=github://${sys.env("GITHUB_REPOSITORY")}/$sha#library/src"
1259+
case None => s"-source-links:$s=github://lampepfl/dotty/$v#library/src"
1260+
}
1261+
12561262
val revision = Seq("-revision", ref, "-project-version", projectVersion)
12571263
val cmd = Seq(
12581264
"-d",

scaladoc/src/dotty/tools/scaladoc/site/StaticSiteContext.scala

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,16 @@ class StaticSiteContext(
146146
if link.startsWith("/") then root.toPath.resolve(link.drop(1))
147147
else template.file.toPath.getParent().resolve(link).normalize()
148148

149-
baseFile.getFileName.toString.split("\\.").headOption.toSeq.flatMap { baseFileName =>
150-
Seq(
151-
Some(baseFile.resolveSibling(baseFileName + ".html")),
152-
Some(baseFile.resolveSibling(baseFileName + ".md")),
153-
Option.when(baseFileName == "index")(baseFile.getParent)
154-
).flatten.filter(Files.exists(_)).map(driFor)
155-
}
149+
val fileName = baseFile.getFileName.toString
150+
val baseFileName = if fileName.endsWith(".md")
151+
then fileName.stripSuffix(".md")
152+
else fileName.stripSuffix(".html")
153+
154+
Seq(
155+
Some(baseFile.resolveSibling(baseFileName + ".html")),
156+
Some(baseFile.resolveSibling(baseFileName + ".md")),
157+
Option.when(baseFileName == "index")(baseFile.getParent)
158+
).flatten.filter(Files.exists(_)).map(driFor)
156159
}.toOption.filter(_.nonEmpty)
157160
pathsDri.getOrElse(memberLinkResolver(link).toList)
158161

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Adoc
3+
---
4+
# Header in Adoc
5+
6+
[A link to](dir/html.md)
7+
[A link to](dir/name...with..dots..md)
8+
[A link to](dir/name.with.md.and.html.md)
9+
[A link to](dir/nested.md)
10+
[A link to](dir/nested.svg)
11+
12+
13+
14+
And a text!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: html named file
3+
---
4+
5+
And a text!
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: A directory
3+
---
4+
# {{ page.title }}
5+
6+
And a text!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Strange name multipke dots in nane
3+
---
4+
5+
And a text!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: name.with.md.and.html
3+
---
4+
5+
And a text!
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Nested in a directory
3+
---
4+
# {{ page.title }}
5+
6+
And a text!
Lines changed: 54 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# {{ page.title }} in header
2+
3+
And a text!

0 commit comments

Comments
 (0)