Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable JS/CSS assets #46

Open
github-actions bot opened this issue Aug 5, 2024 · 1 comment
Open

Configurable JS/CSS assets #46

github-actions bot opened this issue Aug 5, 2024 · 1 comment
Assignees
Labels
apps/indexer bug Something isn't working todo

Comments

@github-actions
Copy link

github-actions bot commented Aug 5, 2024

// FIXME decouple and use config.json

    .replace('class="doc-content"', 'id="doc-content" class="doc-content"');
};

// FIXME decouple and use config.json
const injectAssets: PipelineFunction = ({ html }) => {
  return html
    .replace(
      '<head>',
      '<head><link rel="icon" href="/static/_site/favicon.ico">'
    )
    .replace(
      '</head>',
      `<link rel="stylesheet" href="/assets/ui.css" /></head>`
    )
    .replace('</body>', `<script src="/assets/ui.js"></script></body>`);
};

const removeScripts: PipelineFunction = ({ html }) => {
@github-actions github-actions bot added bug Something isn't working todo labels Aug 5, 2024
@battis
Copy link
Member

battis commented Aug 6, 2024

Partly de-coupled;

// FIXME decouple and use config.json
const injectAssets: PipelineFunction = ({ html }) => {
return html
.replace(
'<head>',
'<head><link rel="icon" href="/static/_site/favicon.ico">'
)
.replace(
'</head>',
`<link rel="stylesheet" href="/assets/ui.css" /></head>`
)
.replace('</body>', `<script src="/assets/ui.js"></script></body>`);
};

@battis battis changed the title decouple and use config.json Configurable JS/CSS assets Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps/indexer bug Something isn't working todo
Projects
None yet
Development

No branches or pull requests

1 participant