question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No matching route found for custom theme css

See original GitHub issue

I’m having trouble using custom themes. I’m trying to customize a theme following the guidelines found at http://fractal.build/guide/customisation/web-themes#template-customisation.

My current structure looks like this:

├── src/
    ├── assets/
    ├── components/
    ├── docs/
├── theme/
    ├── assets/
        ├── favicon.ico (override)
    ├── css/
        ├── mytheme.css (override)
    ├── views/
        ├── partials/
            ├── header.nunj (override)
fractal.js
gulpfile.js

My theme configuration in fractal.js is as follows:


const mandelbrot = require('@frctl/mandelbrot');

const myTheme = mandelbrot({
    favicon: '/assets/favicon.ico',
    skin: 'white',
    nav: ['docs', 'components'],
    styles: [
        'default',
        '/css/mytheme.css'
    ]
});

myTheme.addLoadPath(__dirname + '/theme');
fractal.web.theme(myTheme);

When running serve and opens http://localhost:3000, I get the following errors in the terminal:

✔ Fractal server is now running at http://localhost:3000
[11:16:18] Finished 'fractal:serve' after 2.14 s
✘ No matching route found for /css/mytheme.css
✘ Asset source not found

So basically, I get a 404 on these files. In addition, my custom header.nunj is not being used instead of the default one from mandlebrot.

Should the theme/-folder live inside src in this case, or does it not matter as I define the path in addLoadPath.

I’ve also studied the 24ways version of Fractal, but they just reference a css-file within the src/assets/styles/-folder see fractal.js. This is not really what I want. I’d rather separate overrides of the Web UI to it’s separate folder.

Any examples of github-repos with both custom css and overriding views would be much obliged.

For the record, I’m running: Node v.6.9.5 Fractal v.1.1.3 Mandelbrot v.1.1.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
woldtwerkcommented, Apr 22, 2020

@Wursthandschuh Can you try adding a slash before the filename fractal.css ?

this resolved the issue. Thx for the instant reply

0reactions
LeBenLeBencommented, Apr 22, 2020

@Wursthandschuh Can you try adding a slash before the filename fractal.css ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rails vendor assets not serving .. no route found error
The compilation and creation of css asset file happens after create/update action is completed. The compile_theme method looks for a theme.scss ...
Read more >
No route was found matching the URL and request error after ...
I followed the steps, changed the css, but after trying to migrate I get the error 'No route was found matching the URL...
Read more >
Layout Definition - Single SPA
To define a layout within your index.html file, create a <template id="single-spa-layout"> ... Note that the route path is a URL prefix, not...
Read more >
Getting Started - PrimeVue - PrimeFaces
Import path is available in the documentation of the corresponding component. import {createApp} from 'vue'; import App from './App.vue'; import PrimeVue ...
Read more >
Routes - Scalatra
Not Found (404). The notFound handler allows you to execute code when there is no matching route for the current request's URL. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found