Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Alex
    @awulkan
    Or does that not take into account the /blog baseurl if there is one?
    Harry Wolff
    @hswolff
    hmm
    it should....
    we hsould verify
    i'm heading out
    bbl
    Alex
    @awulkan
    It's 23:46 here, I'll be going to sleep soon
    I need to figure out what's causing Reptar to not find the assets when using reptar watch. :/
    Alex
    @awulkan
    So, take a look at this:
     /**
       * Get File/CollectionPage based on request.path.
       * @param {string} requestPath Request path to server.
       * @return {File|CollectionPage}
       */
      getFile(requestPath) {
        let file = this.index[requestPath];
    
        console.log(requestPath);
        console.log(file);
    
        if (!file) {
          file = this.index[path.join(requestPath, 'index.html')];
        }
        return file;
      }
    It returns this:
    Starting watch.
    √ Reading theme files.           (193ms)
    √ Loading plugins.               (77ms)
    √ Reading files.                 (18ms)
    √ Reading collections.           (5ms)
    Starting watch.                  (361ms)
    
    info:    Server running at: http://127.0.0.1:8080
    /
    undefined
    info:    Rendering CollectionPage post:0
    /css/main-9048261e4d.css
    undefined
    - Reading theme files.          /js/main-c614ff7b24.js
    undefined
    √ Reading theme files.           (87ms)
    √ Loading plugins.               (1ms)
    √ Reading theme files.           (86ms)
    √ Loading plugins.               (1ms)
    √ Reading files.                 (21ms)
    √ Reading collections.           (1ms)
    /css/main-9048261e4d.css
    undefined
    √ Reading files.                 (12ms)
    √ Reading collections.           (2ms)
    /js/main-c614ff7b24.js
    undefined
    So, it finds the route, but when doing this.index[requestPath]; it becomes undefined
    Alex
    @awulkan
    Man, I'm about to give up
    Alex
    @awulkan
    Same thing happens here:
    themeHandler(request, reply) {
        const requestPath = request.path;
    
        console.log("requestPath:", requestPath);
        // Find an associated theme asset.
        const requestAsset = _.find(this.reptar.theme.assets, (asset) => {
          const destination = this.relativeDestination(
            asset.processor && asset.destination ?
              asset.destination :
              asset.config.destination
          );
    
          return requestPath.includes(destination);
        });
        console.log("requestAsset:", requestAsset);
    Starting watch.                                                       
    √ Reading theme files.           (197ms)                              
    √ Loading plugins.               (83ms)                               
    √ Reading files.                 (20ms)                               
    √ Reading collections.           (6ms)                                
    Starting watch.                  (377ms)                              
    
    info:    Server running at: http://127.0.0.1:8080                     
    info:    Rendering CollectionPage post:0                              
    requestPath: /css/main-9048261e4d.css                                 
    requestAsset: undefined                                               
    - Reading theme files.          requestPath: /js/main-c614ff7b24.js   
    requestAsset: undefined                                               
    √ Reading theme files.           (82ms)                               
    √ Loading plugins.               (1ms)                                
    √ Reading theme files.           (84ms)                               
    √ Loading plugins.               (1ms)                                
    √ Reading files.                 (21ms)                               
    √ Reading files.                 (8ms)                                
    √ Reading collections.           (2ms)                                
    √ Reading collections.           (1ms)
    Btw, I get these problems both with your 'thread' theme and my 'breeze' theme.
    So it shouldn't be any configuration error on my part.
    Harry Wolff
    @hswolff
    hmm
    that's annoying
    i'm simplying that in v3 fwiw
    so should be easier to understand
    Alex
    @awulkan
    What are you simplifying?
    The configuration?
    But the problem was that reptar watch doesn't work properly. :)
    It doesn't find assets.
    Alex
    @awulkan
    I haven't been able to troubleshoot further, and I probably won't have time to for a few weeks at least. You probably know how to find the problem faster than me anyway. :)
    Harry Wolff
    @hswolff
    v3 is out :o
    (i removed themes, plz don't kill me alex)
    happy to add them back in but how they were done now i was not happy with
    could also do it via convention
    Alex
    @awulkan
    No worries, I am starting a new job as a C# developer next month so I won't be using Reptar that much.
    I'll be moving to a C#-based site generator.
    Congrats on reaching V3 though! :D
    Harry Wolff
    @hswolff
    congrats on the new job!
    and thank you!
    i only hear good things about c#
    Alex
    @awulkan
    Thanks, it's kinda scary since I have no previous C# experience and it's my first dev job. :D
    Studying a lot right now.
    Maybe one day I'll get back to Reptar again. I hope you won't abandon it.
    Harry Wolff
    @hswolff
    i use it for my blog
    so unless i stop blogging :D
    gonna start working on the admin dashboard next
    i want that bad
    Alex
    @awulkan
    How are you planning to build it?
    Harry Wolff
    @hswolff
    i'm making an api based off your site
    and then making a regular ol' react app to power it
    so you can view all your files, edit it in the browser, save it
    the react app will be self contained, just hitting apis
    Alex
    @awulkan
    ok, cool. Good luck. :)
    Harry Wolff
    @hswolff
    ty! you too!
    Mohammad Asad Mohammad
    @AlahmadiQ8
    Hello, i just wanna ask, are there any plans for 4.x in the near future, or is 3.x is planned to remain for a while?
    Hanu
    @haniuman_twitter
    hi guys!
    Can I use reptar watch to refresh automatically the browser?
    Hanu
    @haniuman_twitter
    Btw, My head is going to explode!
    Last to days, I test so many static site generator, that now I am totally giddy!