Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Narendrasharma146
    @Narendrasharma146
    ?
    If you want me to write your plugins, or optimize your app, talk to Herodevs, and order some constultancy.
    Szénási Dániel
    @danielszenasi
    Hi guys, is there any option to generate the scully-routes.json without actually generating any page?
    Sander Elias
    @SanderElias
    @danielszenasi I can come up with a hacky solution, no problem, but why?
    Szénási Dániel
    @danielszenasi
    @SanderElias Because to delete a folder or files in azure storage is really slow, so we want to regenerate the sitemap.xml with the @gammastream/scully-plugin-sitemap plugin, so google won't find that page even if we didn't delete the folder from the storage
    Sander Elias
    @SanderElias
    So using a different config file for this wouldn't be a problem?
    4 replies
    Szénási Dániel
    @danielszenasi
    that's correct
    Narendrasharma146
    @Narendrasharma146
    @SanderElias But How to implement Dynamic Routing Concept With multiple Dynamic Variables With Json
    2 replies
    because you Suggest the scully.io link ,Scully use one parameter only userId
    Narendrasharma146
    @Narendrasharma146
    @BlindDespair please suggest some hint router plugin
    1 reply
    Narendrasharma146
    @Narendrasharma146
    How to minify our css use scully angular?
    Sander Elias
    @SanderElias
    Use the critical plugin.
    hepsiasansor
    @hepsiasansor_twitter
    Hi guys
    this address enter url not work
    but site in go address work
    can@akburu.com my mail address
    i use angular 13, netlify and scullyio
    Sander Elias
    @SanderElias
    @hepsiasansor_twitter Your site breaks on this:
    image.png
    I have no clue why, might be an AMP thing
    Matti
    @mojo2012

    Hi all,

    we have a highly dynamic web site that loads content from GraphCMS. Therefore we can't do this once on the CI. To always have an up-to-date static site, a cronjob runs the 5 minutes and run ng build and npx scully -- --no-warning. We use the hostUrl setting to actually scrape the live site, instead of using the offline generated build output files from the angular build.
    To make this work, we had to set outputHashing=none, otherwise our regular angular app (running in a docker container) and the static site would have different *<hash>.js files (and also other resources) referenced in the generated HTML.
    This would lead to an evergrowing amount of files on the CDN too. Futhermore it leads to other problems when scully tries to boot the regular angular app.
    Unfortunately there are not infos related to outputHashing, to using the hostUrl setting, or how to actually do what we do.
    Our way of doing things "kind of" works - the only issue we are facing is caching related. As the JS resources (runtime.js, ...) are unversioned, the browser doesn't always load the new resources.
    The main problem seems to be that the scully build process generates new angular build files and copies those files to the static output folder, instead of using the resources from the site specified via hostUrl. I know I could write a plugin that downloads all resources, but it feels that should be a functionality of scully itself. Or why is it even possible to scrape a site - but only "half-way".
    Hope you can help me.
    cheers matti

    Sander Elias
    @SanderElias
    @mojo2012 Cool!
    We are not 'scraping' ;) Well, at least not in the conventional sense.
    The local files are used by design. We don't want to enable use-cases where Scully is used to copy-cat a site.
    18 replies
    Narendrasharma146
    @Narendrasharma146
    Hi @BlindDespair please tell me how to delay Angular in scully
    please tell me Angular Delay Plugin?
    Narendrasharma146
    @Narendrasharma146
    @SanderElias please tell me How to delay Angular in scully plugin
    I guess that is what you are asking for. If not, Herodevs has consultants you can hire.
    amoscatelli
    @amoscatelli
    Hi everybody ! First of all, thank you for Scully. I trying to use Scully with my Angular application but there is something I don't understand. I am using flex layout breakpoints (https://github.com/angular/flex-layout/wiki/Responsive-API) but it seems Scully prerenders only the 'md' breakpoint. You can see it here : https://www.test.divelitalia.it/it/home. Rehydration eventually takes place and the proper breakpoint is activated. I am no Scully expert but it seems to me that Angular/Flex Layout directives don't work till rehydration. Am I right ? I am doing something wrong ? How am I supposed to solve this ? I believe this is a very common situation and I am surprised I found no information about this. Please let me know ! Thank you in advance.
    Sander Elias
    @SanderElias
    @amoscatelli Current Scully does render your app in the default viewport of an browser. iirc that is 800x600, and settable from the config file.
    Scully can only run for 1 breakpoint at a time. Choose the one that will work on all screensizes/
    While we can do multiple runs, for multiple breakpoints, this would mean you get mutliple index.html files for every route. While you can set up a hosting so that it serves different files for different viewports, I don't think this is a path that you should take.
    Sander Elias
    @SanderElias
    Also, another option would be, use the isScullyRunning() in your code to ignore all breakpoints during rendering. Depending on your app, this might be the simplest, or the harderst option.
    BlindDespair
    @BlindDespair
    in JAMStack you should not control your layout by javascript but only by CSS. It's not related to scully exclusively, it's just how pre-rendering works. You don't know what screensize the user will have at the time of rendering, thus you should render for all possible resolutions and use media queries
    Sander Elias
    @SanderElias
    :+1: for that.
    amoscatelli
    @amoscatelli
    Thank you for your answer. Then I could add some css rules using both media query and, for example, the fxshow.web.landscape div attribute. Can I do this directly in Scully ? Is there some plugin to add additional css to the prerendered html ? If not, I will add them directly in the Angular application but I'd rather not.
    Sander Elias
    @SanderElias
    You can create a custom plugin to do that. something like:
    registerPlugin('postProcessByDom', 'addMyCss', async (dom, route) => {
      const {  window: { document }  } = dom;
      const style = document.createElement('style')
      style.innerText = `/* css content here */`
      document.head.appendChild(style)
      return dom
    })
    then add that to your defaultPostRenderers
    amoscatelli
    @amoscatelli
    thank you, I will try this way
    ASPCodes
    @arya-creator
    I have added seoHrefOptimizePlugin to my scully project by configuring defaultPostRenderers : ['setCanonicalLinkPlugin', 'seoHrefOptimisePlugin'], in the scully config file. But even after doing so, the scully routes doesn't have trailing slashes added. I checked the generated index.html for the href tags - no trailing slash. Not sure what I am missing in here. Anyone know how to fix this. Appreciate your help.
    Sander Elias
    @SanderElias
    @arya-creator do you have an reproduction of your issue?
    ASPCodes
    @arya-creator
    @SanderElias Yes, I created a test project and recreated the issue - https://github.com/arya-creator/test-scully-project. The routes generated doesn't have trailing slash and when the page is served on the browser it gives a 301 and redirects to the one with slash. This behavior is creating issues for Google crawl in my original site.
    image.png
    image.png
    Sander Elias
    @SanderElias
    @arya-creator I'll take a look. The seoHrefOptimize should update internal links.
    Sander Elias
    @SanderElias
    @arya-creator you spelled seoHrefOptimise with an z
    I'll put some code in place that will mention non-exisiting plugins, instead of silently ignoring them.
    Sander Elias
    @SanderElias
    And I'll update the docs to show the correct spelling