Skip to content

Add support for content as modules #5973

Closed

Description

@bep

This ties into #5911 and #5074 and isn't something we will solve "today", but I jott it down here so we can ... think about it.

A Hugo Component can currently provide this:

archetypes
assets
data
i18n
layouts
resources
static

A quick and naive approach would be to add content to that list, but there are language configuration and the work coming in #5074 ... And the reason it's not there is that we (or I) do not want themes to provide content. Themes provide look and feel, I provide the prose.

It would, however, obviously be great if I as an enterprise documentation project owner could compose my content from versioned "content components" (partitioned by language or some other topic) so I could say:

content = ["github.com/bep/mytechcontent", "github.com/bep/jokes"]

There are some obvious missing pieces in the above (language, mapping to some section etc. and all the things coming in #5074 ).

/cc @regisphilibert @onedrawingperday and gang

Activity

  1. added this to the v0.56 milestone on May 18, 2019
  2. larzza commented on May 18, 2019

    @larzza

    This is crazy. I have been thinking about the exact same thing this afternoon, but you beat me to it! 😊 (...that must mean it is the correct approach!)

    What I would like is to let a content provider just write content (no frontmatter) in a file hierarchy, for example in a markdown editor, i.e no technical stuff at all. Commit to git and thats it. Yeah, that’s more to it, but maybe it fits with the issue about getting content from other endpoints. (Now I seen you mentioned that issue above #5074)

    I don’t think content should be a theme component but an own module type (as you also seem to think). This separates content from site and theme in a nice way.

  3. regisphilibert commented on May 19, 2019

    @regisphilibert

    For languages, I suppose each language could have, if needed, its own set of content modules just like they can currently have have their own directory.

  4. zivbk1 commented on May 21, 2019

    @zivbk1
    Contributor

    Reminds me of the Antora playbook. https://docs.antora.org/antora/2.0/playbook/

  5. bep commented on May 21, 2019

    @bep
    MemberAuthor

    @zivbk1 yes, I actually stumbled upon a YouTube presentation on Antora some days ago (but probably after I created this particular issue ... :-).

    I think the big difference between this and that is that this is a versioned graph. Playbook looks líke a "flat thing" with manual versioning -- I guess you could do nesting, there, too with submodules, but I think that will get hard to manage as it grows.

  6. zivbk1 commented on May 21, 2019

    @zivbk1
    Contributor

    @bep I'm not sure what you mean by 'this is a versioned graph' and Antora would use manual versioning.

    Here is how you specify the content sources to pull from and the content version (branches/tags) to include for each content source. https://docs.antora.org/antora/2.0/playbook/configure-content-sources/

    You could point to master branch and always pull the latest, but you can also pull from specific branches/tags in that repository to allow for the user to select previous (or future/dev) versions of the content to view in the same site UI.

  7. bep commented on May 21, 2019

    @bep
    MemberAuthor

    @zivbk1 what I mean is that it's a fairly shallow graph (one level) and by "manual versioning" I mean that you need to be fairly explicit when you tell what you want (give me v.1.3.2) and you don't have some of the auto-version-resolution you get in more complex dependency managers. Which is fine for the one-level scenario, but when you introduce transitive dependencies it gets much harder to reason about without help.

  8. added a commit that references this issue on Jun 3, 2019
    b9ac12e
  9. added 5 commits that reference this issue on Jun 10, 2019
    e9d3b7c
    3c98b2d
    103bad5
    d5d7e7e
    923c48a
  10. 10 remaining items

  11. added 2 commits that reference this issue on Jul 10, 2019
    230407e
    d091e65
  12. added 9 commits that reference this issue on Jul 17, 2019
    abd2826
    40072a4
    45ec34c
    bbe2adc
    0363cf5
    06e598e
    23e376c
    aec72a0
    9f5a920
  13. github-actions commented on Feb 17, 2022

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  14. locked as resolved and limited conversation to collaborators on Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions