Repository navigation
Theme assets broken when hosted on GitLab Pages #103
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Activity
@oxr463 I am unable to open
https://foo.gitlab.io. Could you provide a live link? Or steps for reproduction (how did you deploy to GitLab pages)?P.S. I am unaware of how Gitlab pages work so I am not sure if there are multiple ways of deploying, a single recommended method, etc., thats why I'm asking.
Here is my GitLab CI/CD pipeline:
include: - template: Dependency-Scanning.gitlab-ci.yml image: node:latest pages: before_script: - npm i -g @codedoc/cli - npx codedoc install script: - npx codedoc build - mkdir public - cp -R docs public/ - cp favicon.png public/ - cp index.html public/ artifacts: paths: - public only: - masterThe problem appears to be due to this issue. @oxr463 could you please also comment the contents of
.codedoc/config.tshere?Reacted by Lucas Ramage- addeddocumentationImprovements or additions to documentationImprovements or additions to documentation
on Mar 4, 2021 The problem appears to be due to this issue. @oxr463 could you please also comment the contents of
.codedoc/config.tshere?import { configuration } from '@codedoc/core'; import { theme } from './theme'; export const config = /*#__PURE__*/configuration({ theme, // --> add the theme. modify `./theme.ts` for changing the theme. page: { favicon: '/favicon.png', title: { base: 'Foo' // --> the base title of your doc pages } }, });@oxr463 perhaps setting the project namespace resolves the issue? to the best of my (limited) understanding, you should set it to the repo name:
import { configuration } from '@codedoc/core'; import { theme } from './theme'; export const config = /*#__PURE__*/configuration({ theme, // --> add the theme. modify `./theme.ts` for changing the theme. dest: { namespace: '<repo-name>', }, page: { favicon: '/favicon.png', title: { base: 'Foo' // --> the base title of your doc pages } } });
Reacted by Lucas RamageThat fixed it:
dest: { namespace: '/foo' },- locked and limited conversation to collaborators
on Mar 9, 2021
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation


This is from the browser console:
Note: foo is not the real project name.
The published site is missing js and styling due to this error.