Skip to content

Commit

Permalink
feat: move docs dir (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts authored Sep 9, 2020
1 parent 974900f commit df99463
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/introduction.md → website/docs/introduction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
slug: /
title: Introduction
---

Expand Down
3 changes: 1 addition & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {
'@docusaurus/preset-classic',
{
docs: {
path: '../docs',
sidebarPath: require.resolve('./sidebars.js')
},
theme: {
Expand All @@ -31,7 +30,7 @@ module.exports = {
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
to: 'docs/introduction'
to: 'docs/'
},
{
href: 'https://github.com/manaelproxy/manael',
Expand Down
21 changes: 13 additions & 8 deletions website/src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import classnames from 'classnames'
import Layout from '@theme/Layout'
import Link from '@docusaurus/Link'
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
import useBaseUrl from '@docusaurus/useBaseUrl'
import { useBaseUrlUtils } from '@docusaurus/useBaseUrl'
import styles from './styles.module.css'

const features = [
Expand All @@ -25,12 +25,17 @@ const features = [
]

function Feature({ description, imageUrl, title }) {
const imgUrl = useBaseUrl(imageUrl)
const { withBaseUrl } = useBaseUrlUtils()

return (
<div className={classnames('col col--4', styles.feature)}>
{imgUrl && (
{imageUrl && (
<div className="text--center">
<img className={styles.featureImage} src={imgUrl} alt={title} />
<img
className={styles.featureImage}
src={withBaseUrl(imageUrl)}
alt={title}
/>
</div>
)}
<h3>{title}</h3>
Expand All @@ -46,8 +51,8 @@ Feature.propTypes = {
}

function Home() {
const context = useDocusaurusContext()
const { siteConfig = {} } = context
const { siteConfig = {} } = useDocusaurusContext()
const { withBaseUrl } = useBaseUrlUtils()

return (
<Layout description="Manael is a simple HTTP proxy for processing images.">
Expand All @@ -58,7 +63,7 @@ function Home() {
alt={siteConfig.title}
className={classnames('margin-vert--md', styles.heroBannerLogo)}
height={128}
src={useBaseUrl('img/logo.png')}
src={withBaseUrl('img/logo.png')}
width={128}
/>
</h1>
Expand All @@ -69,7 +74,7 @@ function Home() {
'button button--primary button--lg',
styles.getStarted
)}
to={useBaseUrl('docs/introduction')}
to={withBaseUrl('docs/')}
>
Get Started
</Link>
Expand Down

1 comment on commit df99463

@vercel
Copy link

@vercel vercel bot commented on df99463 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.