You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Theme assets broken when hosted on GitLab Pages #103
The resource from “https://foo.gitlab.io/docs/assets/codedoc-styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Note: foo is not the real project name.
The published site is missing js and styling due to this error.
@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.
The problem appears to be due to this issue. @oxr463 could you please also comment the contents of .codedoc/config.ts here?
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';exportconstconfig=/*#__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}}});
Activity
loreanvictor commentedon Mar 3, 2021
@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.
oxr463 commentedon Mar 3, 2021
Here is my GitLab CI/CD pipeline:
oxr463 commentedon Mar 4, 2021
This is
docs/assets:loreanvictor commentedon Mar 4, 2021
The problem appears to be due to this issue. @oxr463 could you please also comment the contents of
.codedoc/config.tshere?oxr463 commentedon Mar 4, 2021
loreanvictor commentedon Mar 4, 2021
@oxr463 perhaps setting the project namespace resolves the issue? to the best of my (limited) understanding, you should set it to the repo name:
oxr463 commentedon Mar 9, 2021
That fixed it: