Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    AceVentura
    @AceVentura
    and about the dynamic routes, is there anyway to reuse the code I already have?
    FlushBG
    @FlushBG
    Hello everybody! I am trying to create a multilingual static site using Angular + Scully. As a CMS I use Storyblok. I get all the strings for each page in each language before bootstrapping the app (using APP_INITIALIZER injection token), then save them in the property of a singleton Storyblok service. I thought Scully would pre-fetch that data, and then generate a static site with it, but apparently the app makes those calls after loading the page. What could be done to solve that problem?
    Sander Elias
    @SanderElias
    @FlushBG use the transferState service, that way you can encapsulate that state into the static HTML files (and data.json files)
    FlushBG
    @FlushBG
    How do you resolve route parameters, without calling an API? Can you have a json file in your project to return the data you need?
    Sander Elias
    @SanderElias
    Scully provides something like that. We will embed your data into the HTML files
    FlushBG
    @FlushBG
    I am trying to implement a language parameter that works when using ng serve
    But won't get generated
    like localhost:4200/en and localhost:4200/it
    Sander Elias
    @SanderElias
    Check the faq's page, iirc there is something about languages
    Manuel Bojato
    @KingDarBoja
    Hi everyone
    I got somewhat scully working after last time but now I wanted to put the blog post content on another component, so I made the :slug route match another component called BlogPostComponent
    Whereas the BlogComponent will now list the blogs by title (which works)
    However, after clicking on my only blog of the list, the page is redirected to BlogPostComponent but doesn't render its content inside scully-content tag
    image.png
    I ran npm run build -> npm run scully -> npm run scully serve
    Manuel Bojato
    @KingDarBoja
    Also, being served (thanks to GH actions) shows something weird
    image.png
    Manuel Bojato
    @KingDarBoja
    Work for less than 1 second locally then same text as prod shows up
    image.png
    So weird... any ideas what is happening?
    image.png
    Manuel Bojato
    @KingDarBoja
    Ok, it stopped happening, so weird
    What I changed: Put a styleUrls on my BlogPostComponent, which seems to be the possible cause of previous behaviour
    Sander Elias
    @SanderElias
    @KingDarBoja There was a bug in one of our versions that would do that under certain circumstances. afaik this is fixed a while ago, are you on a current version?
    Sander Elias
    @SanderElias
    @/all Scully office hours now. With a cool presentation.
    Sander Elias
    @SanderElias
    Sorry, due to some punks we can't accept anyone in anymore.
    Manuel Bojato
    @KingDarBoja
    @SanderElias Yeah, I just checked the changelog, updated to beta 1.0.0 version and it is gone :)
    danhpham511998
    @danhpham511998
    Hi @all, I have error when run npm run jam. please help me tks.
    image.png
    Sander Elias
    @SanderElias
    @danhpham511998 Well, the good thing is, Scully is done. The strange thing is, that error should be impossible at that time.
    I would welcome a way to reproduce this.
    danhpham511998
    @danhpham511998
    @SanderElias thanks you.
    Stepan Suvorov
    @stevermeister
    I just found that in terms of code highlight Scully switched to prism? (https://scully.io/docs/learn/utilities/syntax-highlighting/prism-js/)
    instead of internal highlight with highlightjs
    Manuel Bojato
    @KingDarBoja
    I have used both but PrismJS seems to be more easy to customize / setup
    Sander Elias
    @SanderElias
    @KingDarBoja Prism is indeed easier to customize, that's why we switched. Also it supports more languages out of the box.
    Manuel Bojato
    @KingDarBoja
    :heart: Nice
    I am going to include it on my personal blog, just need to look at docs when I get the time
    Is there any schematic to setup PrismJS on Angular + Scully?
    s0l0c0ding
    @s0l0c0ding
    @SanderElias Hi, moving to prism.js from
    highlight.js broke my java code highlighting, java is a supported lang , so i dont know why this code is getting fired from the markdown plugin? highlight: (code, lang) => { if (!Prism.languages[lang]) { console.error(`Language '${lang}' is not available in Prism.js, ignoring syntax highlighting for this code block.`); return code; }
    7 replies
    urjathakkar
    @urjathakkar
    image.png
    8 replies
    etavener
    @etavener
    Hi I was wondering if someone could help me with an idea, not sure if it's possible.
    I have some global data ( a menu API that is the same on all pages) that i would like to not request each time a page is visited. Is it possible to to create a plugin that makes the api requests and creates / updates each data.json with the data (via transferState) before visiting each route in the list with puppeteer.
    Sander Elias
    @SanderElias
    @etavener easy way, request in using tranferstate in a service in your app, that you then use wherever you need the data.
    15 replies
    It is possible to inject transferstate with route-plugins. So you can do what you want by wrapping all the route plugins you use in some custom router-plugin
    3rth way is use the proccessRoute (or routeProccess) plugin, and add it to each and every route in there.
    4rth way, use the 'preRender' function on each route to inject this data.
    Preston Lamb
    @pjlamb12
    I'm having issues deploying to Netlify. The project runs perfectly on my local machine, and maybe takes a minute or two at most to build. But when I deploy to Netlify, the build just hangs. The Angular project successfully builds, and then Scully discovers the routes before no longer moving on. I'm setting the NODE_VERSION to 12 in the netlify.toml file as well, but that doesn't seem to have helped.
    1 reply