Skip to content

Commit e2f8cd8

Browse files
Fix spacing issues in lists (#57)
* re-organizng ui preview, tailwind improvements * cherry pick list styles from tailwind typography component and adjust for side effects * remove commented code * fix tab issues * fix support margin * remove bad merge resolve, fix titles and conum * bad wrapping selector * nested list margin fix * test gh action change * test another gh action change * fix image targets * put back default build-preview-pages.js from antora aside from one small change * add comment
1 parent 725063b commit e2f8cd8

File tree

15 files changed

+183
-163
lines changed

15 files changed

+183
-163
lines changed

.github/workflows/deploy-bundle-preview.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ jobs:
4141
run: |
4242
set -o pipefail
4343
gulp lint |& tee $GITHUB_WORKSPACE/build.log
44-
UI_ROOT_PATH_PREFIX=${{ github.event.repository.name }}/${{ steps.extract_branch.outputs.draft_branch }} \
45-
gulp preview:build |& tee $GITHUB_WORKSPACE/build.log
44+
gulp preview:build |& tee $GITHUB_WORKSPACE/build.log
4645
4746
- name: Check Build Result
4847
id: logFail

gulp.d/tasks/build-preview-pages.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,19 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
4545
const uiModel = { ...baseUiModel }
4646
uiModel.page = {
4747
...uiModel.page,
48+
// Adding url to uiModel.page allows the nav to properly highlight the current page.
4849
url: path.join('/', path.relative(previewSrc, file.path.replace('.adoc', '.html'))),
4950
}
5051
uiModel.siteRootPath = siteRootPath
51-
52-
// The following has been customized to enable pull request preview builds on Github Pages.
53-
// It differs from the Antora Default UI by allowing for an optional UI_ROOT_PATH_PREFIX.
54-
// This environment variable is set during build to add a prefix to the {{ uiRootPath }} variable.
55-
// This enables us to have preview builds that live in their own subdirectory on GitHub Pages.
56-
let uiRootPath = path.join(siteRootPath, '_')
57-
if (uiModel.env.UI_ROOT_PATH_PREFIX) {
58-
uiRootPath = path.join('/', uiModel.env.UI_ROOT_PATH_PREFIX, uiRootPath)
59-
}
60-
uiModel.uiRootPath = uiRootPath
61-
52+
uiModel.uiRootPath = path.join(siteRootPath, '_')
6253
if (file.stem === '404') {
6354
uiModel.page = { layout: '404', title: 'Page Not Found' }
6455
} else {
6556
const doc = Asciidoctor.load(file.contents, { safe: 'safe', attributes: ASCIIDOC_ATTRIBUTES })
6657
uiModel.page.attributes = Object.entries(doc.getAttributes())
6758
.filter(([name, val]) => name.startsWith('page-'))
6859
.reduce((accum, [name, val]) => {
69-
accum[name.substr(5)] = val
60+
accum[name.slice(5)] = val
7061
return accum
7162
}, {})
7263
uiModel.page.layout = doc.getAttribute('page-layout', 'default')
@@ -147,7 +138,7 @@ function transformHandlebarsError ({ message, stack }, layout) {
147138
const m = stack.match(/^ *at Object\.ret \[as (.+?)\]/m)
148139
const templatePath = `src/${m ? 'partials/' + m[1] : 'layouts/' + layout}.hbs`
149140
const err = new Error(`${message}${~message.indexOf('\n') ? '\n^ ' : ' '}in UI template ${templatePath}`)
150-
err.stack = [err.toString()].concat(stack.substr(message.length + 8)).join('\n')
141+
err.stack = [err.toString()].concat(stack.slice(message.length + 8)).join('\n')
151142
return err
152143
}
153144

preview-src/asciidoc/images.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@
66
== Block images
77

88
.Optional title
9-
image::/img/screenshot.png[Screenshot of Astra Portal Home]
9+
image::../img/screenshot.png[Screenshot of Astra Portal Home]
1010

1111
=== Sizing and alignment
1212

1313
.400px width, align="left"
14-
image::/img/screenshot.png[Screenshot of Astra Portal Home,400,align="left"]
14+
image::../img/screenshot.png[Screenshot of Astra Portal Home,400,align="left"]
1515

1616
.400px width, align="right"
17-
image::/img/screenshot.png[Screenshot of Astra Portal Home,400,align="right"]
17+
image::../img/screenshot.png[Screenshot of Astra Portal Home,400,align="right"]
1818

1919
.400px width, align="center"
20-
image::/img/screenshot.png[Screenshot of Astra Portal Home,400,align="center"]
20+
image::../img/screenshot.png[Screenshot of Astra Portal Home,400,align="center"]
2121

2222
=== Float
2323

2424
[.float-group]
2525
--
26-
image:/img/screenshot.png[Screenshot of Astra Portal Home,300,float=right,role=float-gap]
26+
image:../img/screenshot.png[Screenshot of Astra Portal Home,300,float=right,role=float-gap]
2727
In AsciiDoc, creating paragraphs is a straightforward process that does not require any special markup. A paragraph can be defined as one or more lines of consecutive text that are logically grouped together. To differentiate between paragraphs, you simply need to insert at least one blank line between them.
2828
--
2929

3030
[.float-group]
3131
--
32-
image::/img/multirepo-ssg.svg[Multirepo SSG,300,float=left,role=float-gap]
32+
image::../img/multirepo-ssg.svg[Multirepo SSG,300,float=left,role=float-gap]
3333
In AsciiDoc, creating paragraphs is a straightforward process that does not require any special markup. A paragraph can be defined as one or more lines of consecutive text that are logically grouped together. To differentiate between paragraphs, you simply need to insert at least one blank line between them.
3434
--
3535

3636
== Inline images
3737

38-
Click image:/img/play_circle_FILL0_wght400_GRAD0_opsz24.svg[title=Play] to get the party started.
38+
Click image:../img/play_circle_FILL0_wght400_GRAD0_opsz24.svg[title=Play] to get the party started.
3939

40-
Click image:/img/pause_circle_FILL0_wght400_GRAD0_opsz24.svg[title=Pause] when you need a break.
40+
Click image:../img/pause_circle_FILL0_wght400_GRAD0_opsz24.svg[title=Pause] when you need a break.
4141

4242
== Image theming (light/dark mode)
4343

@@ -63,7 +63,7 @@ image::dark-mode-illustration.png[Alt text,400,role=for-dark]
6363
.inline image
6464
[source,asciidoc]
6565
----
66-
Click the Astra Vector icon image:/img/astra-vector-light.svg[title="Astra Vector",role=for-light] image:/img/astra-vector-dark.svg[title="Astra Vector",role=for-dark].
66+
Click the Astra Vector icon image:../img/astra-vector-light.svg[title="Astra Vector",role=for-light] image:../img/astra-vector-dark.svg[title="Astra Vector",role=for-dark].
6767
----
6868
6969
Method 2: SVG image with CSS variables::
@@ -98,13 +98,13 @@ For example:
9898
======
9999

100100
.themed block image
101-
image::/img/light-mode-illustration.png[Alt text,400,role=for-light]
101+
image::../img/light-mode-illustration.png[Alt text,400,role=for-light]
102102

103103
.themed block image
104-
image::/img/dark-mode-illustration.png[Alt text,400,role=for-dark]
104+
image::../img/dark-mode-illustration.png[Alt text,400,role=for-dark]
105105

106106
.themed inline image
107-
Click the Astra Vector icon image:/img/astra-vector-light.svg[title="Astra Vector",role=for-light] image:/img/astra-vector-dark.svg[title="Astra Vector",role=for-dark].
107+
Click the Astra Vector icon image:../img/astra-vector-light.svg[title="Astra Vector",role=for-light] image:../img/astra-vector-dark.svg[title="Astra Vector",role=for-dark].
108108

109109
== Icons
110110

preview-src/asciidoc/lists.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ With another paragraph.
103103
Third term::
104104
Description of the first term.
105105

106-
107106
=== Horizontal description list (unconstrained)
108107

109108
[horizontal]

preview-src/asciidoc/tabsets.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
:tabs-sync-option:
55
:tabs-sync-storage-key: tabs
66
:tabs-sync-storage-scope: session
7-
:cassandra-icon: image:/img/cassandra-original.svg[,28]
8-
:java-icon: image:/img/java-original.svg[,22]
9-
:python-icon: image:/img/python-original.svg[,22]
10-
:shell-icon: image:/img/shell-original.svg[,20]
7+
:cassandra-icon: image:../img/cassandra-original.svg[,28]
8+
:java-icon: image:../img/java-original.svg[,22]
9+
:python-icon: image:../img/python-original.svg[,22]
10+
:shell-icon: image:../img/shell-original.svg[,20]
1111

1212
[NOTE]
1313
====

preview-src/page-templates/full.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ From AI-driven capabilities to robust data stream management, Astra simplifies c
1515
++++
1616

1717
[discrete.!m-0]
18-
== [.rounded-xl.border.p-1.flex.w-max.mb-1]#icon:/img/astra-database.svg[]# Vector
18+
== [.rounded-xl.border.p-1.flex.w-max.mb-1]#icon:../img/astra-database.svg[]# Vector
1919

2020
Delve into a database optimized for AI-driven tasks.
2121
Astra Vector is tailored to offer unparalleled precision, speed, and scalability for AI applications, transforming how your applications perceive and interact with data.
@@ -27,8 +27,8 @@ xref:astra-db-vector:ROOT:index.adoc[Go to Vector Docs,role="btn btn-primary btn
2727
<div class="hidden lg:block flex basis-1/2 relative">
2828
++++
2929

30-
image::/img/cosine-similarity-distribution-light.png[Graph of cosine similarity distribution,width=515,align=center,role="for-light absolute -bottom-3 right-0"]
31-
image::/img/cosine-similarity-distribution-dark.png[Graph of cosine similarity distribution,width=515,align=center,role="for-dark absolute -bottom-3 right-0"]
30+
image::../img/cosine-similarity-distribution-light.png[Graph of cosine similarity distribution,width=515,align=center,role="for-light absolute -bottom-3 right-0"]
31+
image::../img/cosine-similarity-distribution-dark.png[Graph of cosine similarity distribution,width=515,align=center,role="for-dark absolute -bottom-3 right-0"]
3232

3333
++++
3434
</div>
@@ -46,7 +46,7 @@ image::/img/cosine-similarity-distribution-dark.png[Graph of cosine similarity d
4646
++++
4747

4848
[discrete]
49-
== [.rounded-xl.border.p-1.flex.w-max.mb-1]#icon:/img/astra-database.svg[]# Serverless
49+
== [.rounded-xl.border.p-1.flex.w-max.mb-1]#icon:../img/astra-database.svg[]# Serverless
5050

5151
Delve deep into high-dimensional spaces with Astra Vector.
5252
Engineered for AI-intensive tasks, it offers unparalleled precision, speed, and scalability. Bring complex AI models into production with confidence, leveraging Astra's robust architecture.
@@ -60,7 +60,7 @@ https://docs.datastax.com/en/astra-serverless/docs/index.html[Go to Serverless D
6060
++++
6161

6262
[discrete]
63-
== [.rounded-xl.border.p-1.flex.w-max.mb-1]#icon:/img/astra-streaming.svg[]# Streaming
63+
== [.rounded-xl.border.p-1.flex.w-max.mb-1]#icon:../img/astra-streaming.svg[]# Streaming
6464

6565
Harness real-time data with Astra Streaming.
6666
Process, analyze, and act on data as it's generated. Whether you're analyzing user behavior or monitoring systems, Astra Streaming delivers the real-time insights you need.

preview-src/page-templates/integrations-detail.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= LangChain
22
:page-layout: tutorial
3-
:page-icon: preview-src/img/langchain.svg
3+
:page-icon: preview-src../img/langchain.svg
44
:page-toclevels: 1
55
:keywords: Machine Learning Frameworks, Embedding Services, Free, Data Warehouses, SDK
66
:description: By integrating LangChain with {product}, you can seamlessly utilize the advanced linguistic processing capabilities of LangChain within your database environment.
@@ -37,7 +37,7 @@ By integrating LangChain with Astra, you can seamlessly utilize advanced linguis
3737
This combination enhances vector data analysis, allowing natural language data to be processed, stored, and queried with efficiency.
3838
3939
.Architecture diagram
40-
image::/img/placeholder-image.svg["Diagram of LangChain integration architecture"]
40+
image::../img/placeholder-image.svg["Diagram of LangChain integration architecture"]
4141
4242
To get started, ensure you have an https://example.com[active LangChain account^,role=external] with the requisite permissions.
4343
@@ -76,7 +76,7 @@ Ensure your integration was successful by checking for new linguistic vector ent
7676
. Open the 'Vector Data' tab.
7777
. Confirm the appearance of recent vector entries from LangChain.
7878
79-
image::/img/placeholder-image.svg["Screenshot"]
79+
image::../img/placeholder-image.svg["Screenshot"]
8080
8181
[.header-noline]
8282
== Advanced configuration

preview-src/page-templates/integrations-overview.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
= Integrations
22
:page-layout: tutorial
3-
:hugging-icon: image:/img/hugging-face.svg[,20]
4-
:langchain-icon: image:/img/langchain.svg[,20]
5-
:openai-icon: image:/img/openai.svg[,20]
6-
:jina-icon: image:/img/jina.svg[,20]
7-
:deepset-icon: image:/img/deepset.svg[,20]
8-
:cohere-icon: image:/img/cohere.svg[,20]
9-
:llamaindex-icon: image:/img/llamaindex.svg[,20]
10-
:cassio-icon: image:/img/cassio.svg[,20]
3+
:hugging-icon: image:../img/hugging-face.svg[,20]
4+
:langchain-icon: image:../img/langchain.svg[,20]
5+
:openai-icon: image:../img/openai.svg[,20]
6+
:jina-icon: image:../img/jina.svg[,20]
7+
:deepset-icon: image:../img/deepset.svg[,20]
8+
:cohere-icon: image:../img/cohere.svg[,20]
9+
:llamaindex-icon: image:../img/llamaindex.svg[,20]
10+
:cassio-icon: image:../img/cassio.svg[,20]
1111

1212
Dive into our curated marketplace of integrations
1313
that elevate the capabilities of Astra's vector databases.

preview-src/page-templates/tutorial.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Add the `.step-reset` role to a section title to reset the step number.
4848
4949
Learn how to create a new database, connect to your database, load a set of vector embeddings, and perform a similarity search to find vectors that are close to the one in your query.
5050
51-
image::/img/placeholder-image.svg["Tutorial overview"]
51+
image::../img/placeholder-image.svg["Tutorial overview"]
5252
5353
== Prerequisites
5454

0 commit comments

Comments
 (0)