Skip to content

Commit 025b40f

Browse files
authored
Fix/escsp 6128 fix images not showing (#727)
* fix: update media path * fix: add absolute path for images * fix: images * fix: remove query params * fix: rollback media path
1 parent 01f57c5 commit 025b40f

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

content/docs/getting-started/getting-started-sparkpost.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ Note: SparkPost expects to see a [legitimate web presence](https://www.sparkpost
4848

4949
If you didn't add a sending domain during your sign up process, you can [add one now in the SparkPost app](https://app.sparkpost.com/domains/create) ([EU](https://app.eu.sparkpost.com/domains/create)). If you already added a domain, visit the [Domains](https://app.sparkpost.com/domains/list) ([EU](https://app.eu.sparkpost.com/domains/list)) page to find your existing domain and click on the domain to complete the domain set up.
5050

51-
![Editing domain settings](/media/getting-started-sparkpost/domain-edit-page.png)
51+
![Editing domain settings](media/getting-started-sparkpost/domain-edit-page.png)
5252

5353
### Step 2: Verify Domain
5454

5555
Before you can send mail using your domain, we need to verify that you own it. Adding a DNS record to your domain is the recommended way to complete this verification. In the **DNS Verification** section you can find the TXT record Hostname and Value you need to add to your domain's DNS records.
5656

57-
![Domain DNS verification section](/media/getting-started-sparkpost/domain-verification-section.png)
57+
![Domain DNS verification section](media/getting-started-sparkpost/domain-verification-section.png)
5858

5959
If you are using a subdomain, we recommend you also add the CNAME record specified under the **Bounce** section. Top-level domains should skip this step and add a [custom bounce domain](#header-Bounce-Domains).
6060

@@ -77,7 +77,7 @@ Here are some how-to documents for editing DNS records with common DNS providers
7777

7878
Once your DNS record has been found, your domain's status will change to "Pending". This means the domain is in our final review process which will verify that the domain meets [our best practice requirements](https://www.sparkpost.com/docs/getting-started/requirements-for-sending-domains/). This usually takes just a few minutes, but can sometimes take up to an hour. Once the review is complete, the domain will be ready to send.
7979

80-
![Ready to send](/media/getting-started-sparkpost/status-section.png)
80+
![Ready to send](media/getting-started-sparkpost/status-section.png)
8181

8282
## Important: Coming From Other Email Services
8383

@@ -182,7 +182,7 @@ By default, SparkPost uses a generic bounce domain for your email, such as *spar
182182

183183
To do this, visit the [Domains](https://app.sparkpost.com/domains/list) ([EU](https://app.eu.sparkpost.com/domains/list)) page and either add a new domain or edit an existing domain. In either case, **you will need to edit DNS records to set up your bounce domain**. Add the CNAME record with the value shown under **Bounce** and verify. DNS updates can take up to 24 hours to complete, but are usually available within an hour. Once verified the domain will be ready for use as a Bounce domain.
184184

185-
![Domain DNS verification section](/media/getting-started-sparkpost/domain-verification-section.png)
185+
![Domain DNS verification section](media/getting-started-sparkpost/domain-verification-section.png)
186186

187187
### Tracking Domain
188188

@@ -193,15 +193,15 @@ In order to track clicks on your emails, SparkPost wraps links in your emails to
193193

194194
Signal Analytics, Events, and Webhooks help you keep track of your SparkPost account activity and email delivery performance. Metrics and events are both available visually and through the API, while webhooks offer an efficient way to have SparkPost push message events directly to your own app.
195195

196-
![Summary report](/media/getting-started-sparkpost/summary-report-section.png)
196+
![Summary report](media/getting-started-sparkpost/summary-report-section.png)
197197

198198
<div align="center"><em>Summary report</em></div>
199199

200200
### Events
201201

202202
When you send an email through SparkPost, it emits a sequence of events so you can see when it's delivered, when the recipient opens it and clicks on links, and various related events. Here's a chart of SparkPost's major message events in sequence:
203203

204-
![SparkPost message events in sequence](/media/getting-started-sparkpost/message-events.png)
204+
![SparkPost message events in sequence](media/getting-started-sparkpost/message-events.png)
205205

206206
<div align="center"><em>SparkPost message events in sequence</em></div>
207207

pages/docs/[...slug].tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import DocumentationContent from 'components/site/documentationContent';
1414
import DocsIndexListPageContent from 'components/site/docsIndexListPageContent';
1515
import type { NavigationItemProps } from 'components/site/baseNavigation';
1616
import { useRouter } from 'next/router';
17+
import { useEffect } from 'react';
1718

1819
type PostPageProps = {
1920
content: string;
@@ -31,6 +32,14 @@ const PostPage = (props: PostPageProps): JSX.Element => {
3132
const { content, data, navigationData, isIndex, categoryData } = props;
3233
const router = useRouter();
3334

35+
useEffect(() => {
36+
const path = router.asPath.split('?')[0];
37+
const tagId = router.asPath.split('#')[1];
38+
39+
router.push(path + (tagId ? '#' + tagId : ''))
40+
// eslint-disable-next-line react-hooks/exhaustive-deps
41+
}, []);
42+
3443
// This is to check for a url that either contains a trailing slash or not (since netlify will show either)
3544
const trailingSlashOrNo = (navData: NavigationItemProps): boolean => {
3645
const linkComponents = navData.link.split('/');
@@ -39,6 +48,7 @@ const PostPage = (props: PostPageProps): JSX.Element => {
3948

4049
return link === router.asPath || link + '/' === router.asPath;
4150
};
51+
4252
return (
4353
<CategoriesProvider data={categoryData}>
4454
<SEO title={data.title} description={data.description} />

0 commit comments

Comments
 (0)