by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Thanos Psaridis
    @ThanosFisherman
    {{posts.authors.email}} won't return anything
    Thanos Psaridis
    @ThanosFisherman
    on the other hand the page.someExtraProperty works fine so I can just use that for global variables
    Casey Brooks
    @cjbrooks12
    The author is attached to each blog post page, so it would be like page.author.email. This works in the layout (referring to the current page), or can be from each page as you're looping over a list of pages (such as on the homepage)
    Screen Shot 2020-04-24 at 11.04.27 AM.png
    Screen Shot 2020-04-24 at 11.04.40 AM.png
    Screen Shot 2020-04-24 at 11.05.22 AM.png
    Screen Shot 2020-04-24 at 11.06.03 AM.png
    Thanos Psaridis
    @ThanosFisherman
    Ah makes sense now. I was trying to fetch those values from the side panel which is located in templates/includes/widget-about.peb so apparently it won't work for pages inside this directory?
    image.png
    {% include 'includes/sidebar' %} <--- this line here in homepage.peb
    Casey Brooks
    @cjbrooks12
    Ah, I see. Authors get a page generated for each, so you can use the find(itemId='Thanos').author function to access the global author object
    Thanos Psaridis
    @ThanosFisherman
    image.png
    this seems to work :)
    Casey Brooks
    @cjbrooks12
    🎉
    Thanos Psaridis
    @ThanosFisherman
    so this posts plugin works only on layout dirs and and homepage but again authors can be different for each post and the author object can either be accessed via page or post It was kind of confusing at first
    I'm just trying to comprehend this concept :P
    Casey Brooks
    @cjbrooks12
    Generally-speaking, an Author is specific to the OrchidPosts plugin, and the pages generated by that plugin have an author attached to them, which can be accessed with .author. So anytime you can get a reference to one of those pages, you can call .author to get the author. Within the post.peb layout, the page variable refers to the current blog post, so you can use page.author. If you get a single page with find() or a list of pages with findAll(), if those pages are blog post or author pages, you can use .author on them
    The other pages in your site (static pages, homepage, etc), do not have the author attached to them. So if you want to display the author information, you'd want to lookup one of the pages that do have an author, and access it that way
    But yeah, I'd definitely realizing now that there should be a better way to access authors instead of only through pages. but hopefully that helps clear it up a bit for now
    Thanos Psaridis
    @ThanosFisherman
    Got it! Yeah it's much clearer to my head now thanks
    Casey Brooks
    @cjbrooks12

    You're very welcome! And I'm excited to help you figure this all out, it's definitely revealing areas in the theme-creation area that could be improved. I've been focused on the architecture and documentation side of things for a while, but am starting to come back to improving the theming and templating experience, so this is really good timing, and giving me some good stuff to think about!

    This is the first I've really seen Orchid put up directly against Jekyll, trying to convert a theme like this. I'm happy to see you're sticking with it, and I'm happy to struggle through it with you!

    Thanos Psaridis
    @ThanosFisherman
    I'm also happy to dive into this static web stuff. I'm an android developer and a kotlin fanboy so I thought that orchid could smoothen my transition from kotlin-android into kotlin-web and that was the primary reason i chose it since I can always dig into a source code I "kind of understand".
    Ultimately I'd like to help you improve the documentation once I finish with this blog and have it all figured out (hopefully). I can already tell that OrchidPosts doc could be improved with everything you wrote to me here and even better.
    hopefuly I will stick to this plan when I find some free time from my job
    Thanos Psaridis
    @ThanosFisherman
    Just FYI I ended up using the custom variable names in config.yml under the allpages: field because when I use the author variables from orchidPosts for some strange reason some new posts pop up an the bottom of my page displaying the author variable values on them. And That's something I don't want for now so I commented out everything about posts field.
    image.png
    Thanos Psaridis
    @ThanosFisherman
    this is what I mean ^
    Casey Brooks
    @cjbrooks12
    When you query for pages with findAll(), if you only pass collectionType then it will return pages from multiple collections, any ones that have the specified type. In this case, the OrchidPosts plugin creates two collections, both of type posts: blog with the blog posts, and authors with all the configured authors. So to only get the blog posts, you can change the query from findAll(collectionType='posts') to findAll(collectionType='posts', collectionId='blog')
    Thanos Psaridis
    @ThanosFisherman
    Yeap you are right once again. It feels like OchidPosts plugin is doing too much magic under the hood or maybe I just don't fully understand how it works yet haha
    Casey Brooks
    @cjbrooks12
    There's definitely a lot of magic, and it's one of the oldest plugins and isn't quite built to be as flexible or as self-documenting as it should be. Probably the bigger issue is just that the documentation for it, on my part, is not very good. Especially for OrchidPosts, most of the effort in documentation and features lately have been on using Orchid for documentation sites, and I haven't gone back and revisited the Posts documentation in a while to trim it down, and make the important parts more clear.
    Roman
    @Fomikadze
    Hi! Does anyone know how to make Orchid Dokka plugin include private variable and classes? To so in Dokka I add <includeNonPublic>true</includeNonPublic>. May be there is some way to path this parameter to throw Orchid args?
    Rajmahendra
    @rajmahendra

    I am using OrchidStarter project when I run i am getting folowing error
    [INFO] OrchidWebserver: Serving: [GET] /
    [ERROR] Errors:
    [ERROR] PebbleCompiler:
    [ERROR] - Error rendering Pebble template (see template source below)

    [ERROR] Errors:
    [ERROR] PebbleCompiler:
    [ERROR] - <article class="post single">
    <header>
    <div class="title">
    <h2><a href="{{ page.link }}">{{ page.title }}</a></h2>
    </div>
    </header>
    {{ page.content | raw }}
    </article>

    and the homepage.md is not rendering

    homepage.md

    `

    title: "Test"
    components:

    • type: pageContent
    • type: recentPosts
      limit: 4
      noWrapper: true
      template:
      • 'includes/postPreview_large'

    Hello, Orchid

    You are beautiful, and so is your website.

    Let's build something beautiful and unique, together.
    `

    Rajmahendra
    @rajmahendra
    Code is here the homepage.md and posts are not properly creating. i am looking for blogs renders as year month day slug
    Rajmahendra
    @rajmahendra
    @all anyone tried this @cjbrooks12
    Casey Brooks
    @cjbrooks12
    @rajmahendra I'm taking a look at the repo now
    Casey Brooks
    @cjbrooks12
    Ok, so there were a couple issues with the config, and I made a PR to your repo with these changes:
    • Seems having services.generators.externalIndices was what was causing the homepage to disappear. I have no clue why,
      must be a bug somewhere with that. But it's not necessary, so I removed it
    • Categories are applied to posts by the subdirectory they are in, along with the categories being declared in
      config.yml. Having categories in the front matter doesn't work, so I moved the blog post files to their
      respective subdirs and they showed up on the homepage lists.
    • The config for the theme and taxonomies seemed to have gotten out-of-order in config.yml. Having the additional
      config files in the config/ directory may have also been causing issues, so I condensed them all into the one
      config.yml to keep it all straight. You may want to break it up again later once you have it configured as you
      want it.
    • Also, for making a new theme from a Hugo one, you'll have to rewrite the templates using Orchid's template language,
      Pebble, and adapt them to Orchid's way of doing things. See the conversation above with Thanos Psaridis as we worked
      to do a similar thing for a Jekyll theme. The whole process is kinda messy now and there isn't any documentation, so
      I'm happy to work with you here on Gitter to get this process ironed out. I'm starting to work on a theme
      development guide, but it's not done yet.
    Rajmahendra
    @rajmahendra
    @cjbrooks12 Thank you so much for the Enlightenment :)
    I am very bad in designing web pages so I just relay on predesigned sites I am a middleware developer :) I will create a repo in my and see how the theme transformation going I can post here.
    Rajmahendra
    @rajmahendra
    @cjbrooks12 i am trying to creating my own OrchidTheme based on the existing one here https://github.com/rajmahendra/OrchidMyTheme when I try to compile I am getting Unresolved reference for com.eden.orchid.api.theme.assets.AssetManagerDelegate and com.eden.orchid.api.theme.models.SiteSocial i am using orchid 0.20.0
    Casey Brooks
    @cjbrooks12
    The current dev branch has some changes regarding the Theme class, which will be released in 0.21.0 (hopefully in the next week or so). For 0.20.0, you should be looking at the master branch https://github.com/orchidhq/Orchid/blob/master/themes/OrchidEditorial/src/main/kotlin/com/eden/orchid/editorial/EditorialTheme.kt
    Rajmahendra
    @rajmahendra
    @cjbrooks12 thank you. it works! I have changed my permalink: 'blog/:year/:monthName/:slug' I am still using category. I do see the blog folder created and all categories inside that, but I do not see an index file in the blog, I want an index file with pagination of all the posts in this folder.
    Casey Brooks
    @cjbrooks12
    The Posts plugin creates the blog posts themselves, the Taxonomies plugin creates the archives https://orchid.run/plugins/orchidtaxonomies
    Specifically, Collection Archives will create paginated lists for the posts in their current structure, but you can use Taxonomy archives to add additional paginated lists for things like tags
    Rajmahendra
    @rajmahendra
    I need ur help again. :) for index file for blog folder I tried to set using Taxonomy but nothing working for me in your free time could you please send up for me? https://github.com/rajmahendra/OrchidTestBlog
    I like to have title, date , author and feature image in that
    with pagination.
    Casey Brooks
    @cjbrooks12
    @rajmahendra I opened another PR. Just a small tweak to the configuration for generating paginated post archives, and updating the post list template to use the same one as used on the sample theme homepage
    Rajmahendra
    @rajmahendra
    Great, thank you so much :) it looks nice. I can tweak it now.