Fakultas Ilmu Komputer UI

Commit c9c0def0 authored by Muhammad Fairuzi Teguh's avatar Muhammad Fairuzi Teguh
Browse files

Merge branch 'warmfix-edukasi' into 'staging'

Warmfix edukasi

See merge request !116
parents 87d2200f 873f20c8
Pipeline #48985 passed with stages
in 13 minutes and 44 seconds
......@@ -12,6 +12,6 @@ class ArtikelFactory(factory.DjangoModelFactory):
class Meta:
model = Artikel
title = fake.sentence()[:-1]
title = fake.sentence()[:-1][:30]
featured_image = os.path.join("edukasi", "placeholder.jpg")
content = "\n".join(fake.paragraphs())
......@@ -19,7 +19,7 @@ class Command(BaseCommand):
for i in range(5):
content.append(" ".join(fake.paragraphs()))
Artikel.objects.create(
title=fake.sentence()[:-1],
title=fake.sentence()[:-1][:30],
featured_image=os.path.join("edukasi", random.choice([ # NOSONAR
"placeholder1.jpg", "placeholder2.jpg", "placeholder3.jpg"])),
content="\n".join(content)
......
......@@ -16,6 +16,8 @@ switch (ENV) {
BASE_API_URL = "http://localhost:8080"
}
export const pathPrefix = ENV === "staging" ? "/staging" : "/"
export const apexOptions = {
chart: {
type: "bar",
......
......@@ -9,6 +9,7 @@ import SEO from "../components/seo"
import Spinner from "../components/spinner"
import { Link } from "gatsby"
import "./article.css"
import { pathPrefix } from "../config"
const Content = props => {
const articleId = props.id
......@@ -92,7 +93,7 @@ const Content = props => {
const Article = () => {
return (
<Router>
<Content path="/article/:id" />
<Content path={pathPrefix + "/article/:id"} />
</Router>
)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment