Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features Wishlist #1

Closed
ChristopherBiscardi opened this issue Dec 31, 2015 · 4 comments
Closed

Features Wishlist #1

ChristopherBiscardi opened this issue Dec 31, 2015 · 4 comments

Comments

@ChristopherBiscardi
Copy link
Member

We want to use this for blogging. What features should we prioritize?

Killer Features

  • Image Handling (Image Handling #6)
    • Preview Photos
    • Image Optimization
    • Featured image handling for blogposts
  • Declarative "templating" and querying
    • The meat of creating themes.
    • Declaratively create React Component which will handle rendering the page. Integration with fate belongs here
    • Querying mechanism means only the data that is required is fetched. Every static site will be usable as a webapp after loading the static html page, increasing the user experience once someone is on the site. This enables things like code splitting and page transitions.

We should "launch" with it

  • Post Status (draft/published)
  • Categories (and "rollup" category pages)
  • Tags
  • Easy analytics integration

Secondary

  • Search
  • Archive page (Another form of a "rollup" page)
  • Image Component
    • An image component will allow specifying the exact sizes of an image. It will then use these to construct require statements with query strings so the images are optimized in the loader.

If we get to it

  • Atom (RSS) Feeds
  • "Share Buttons" -- mostly because people tend to like having them. We should look at how other sites like medium handle sharing too.
  • Comments?
  • Tweet on deploy
    • when you run a "deploy" plugin, it should be able to send out a tweet automatically

Default Content Type Features

The default content types will be leo-markdown and leo-blogpost.

  • shortcodes (what do these look like in a React World?)
  • Related Posts

Ping @jsouth for your list

@ChristopherBiscardi ChristopherBiscardi changed the title Blog Wishlist Features Wishlist Dec 31, 2015
@jsouth
Copy link

jsouth commented Jan 3, 2016

Working list....

Primary

  • Clean Urls (Default url is the blog post title ie: "http://myblogiscool/josh-will-ollie-your-car", unless the user would like to customize differently). We should nail this down early.
  • Post Status (draft/published)
  • Image Component (also see https://www.drupal.org/project/imagecache for some inspiration) Each blog can have a featured image, and supporting images. Let's put some extra effort into this one.
  • Preview Photos (this looks cool)
  • Categories
  • Tags
  • Search
  • Analytics
  • Archive page (Another form of a "rollup" page) - Like the blog home page with snippets?
  • Text formatting for posts (this will be markdown right?)

Secondary (things we need, but can come in round two)

  • Comments
  • Share Buttons
  • Sticky Posts
  • Blog post should have ability to add simple gallery on a per post basis
  • Tweet on deploy - when you run a "deploy" plugin, it should be able to send out a tweet automatically(+1)
  • Custom metadata
  • Archive page (Another form of a "rollup" page
  • Atom (RSS) Feeds
  • Video embed

@ChristopherBiscardi
Copy link
Member Author

Clean Urls

I haven't fully fleshed this out yet, but right now we're using frontmatter for the markdown files. We could ship default url-generation rules with content types and allow overriding urls per-file in the frontmatter. Requires more thought. Any insight from "how a user should use the url generation functionality" would be great here.

On the same topic, We need dirty urls too. For example, I need to import my wordpress posts which all have urls associated with them that I don't want to break, so I need to be able to override them in the frontmatter.

Post Status (draft/published)

A frontmatter attribute I would think. We'll need to provide some optional filters when querying the data and default them to "published or not specified". We'll also need a "build site with drafts" option I would think, but that can come a bit later.

----
status: draft
---

# My great post!

Image Component

This could be a killer feature if we nail it right. Between the preview photo functionality and being able to spit out srcset.

Optimization is currently handled by img-loader. This allows us to optimize gifs, jpegs, pngs, and svgs with varying settings. It's important that the compression is on by default so people can drop in files that are way too big and it will "just work" efficiently. This is similar to the functionality provided by imagecache, except we have to do all of the work up front since we won't have a webserver, etc.

I'd imagine that the image resizing functionality of imagecache would be provided as part of a content-type plugin. IE: leo-plugin-blogpost would provide frontmatter attributes for featured images and automatically handle the optimization, etc. Presumably the images inside the markdown would be handled by the generic image optimization functionality for all images.

Categories/Tags/Archive

The content-type will provide hooks for filtering based on any provided attributes.

For example a blogpost might end up looking like this "in the database":

{
  attributes: {
    title: 'An Awesome Post',
    category: 'haskell',
    tags: ['functional-programming', 'docker'],
    lastUpdated: '12/19/2015',
    excerpt: 'really long...'
  },
  body: '<p>really long content</p>'
}

The blogpost plugin should provide hooks which allow querying based on these attributes.

postsInCategory(category: 'haskell') {
  title,
  excerpt
}

which would result in getting an array of data like:

[{
  title: 'An Awesome Post',
  excerpt: 'really long...'
}, {
  title: 'Another Haskell Post',
  excerpt: 'this one is longer than the other, but...'
}]

URL generation for pagination could be more effort than it's worth at this time, so we should skip that. Instead you could run one of the above queries, returning all possible matches, for a rollup "all posts in category" page.

You should be able to do the same thing for a homepage, but the query will presumably be limited to 5 results or something similar so the homepage gets just the posts you want to render.

Analytics

Default starter kits should come with an opinionated analytics implementation. This will basically just be a React component included at the bottom of the html template or similar.

<GoogleAnalytics uuid='somethingsdkltu849i0hgs' />

Text formatting for posts (this will be markdown right?)

We are using markdown-it (demo link) for markdown parsing right now; this is for our blogpost and markdown content types. In the future we will have more content types such as latex, etc.

markdown-it is CommonMark compliant with a plugin system. This is how I imagine we implement shortcodes such as video.

We can also use the ecosystem of markdown-it plugins to add functionality like footnotes, abbr and the ever critical emoji

@ChristopherBiscardi
Copy link
Member Author

For <head> content, we're using react-helment, but it's not fully implemented yet.

@ChristopherBiscardi
Copy link
Member Author

Closing this since all of the infrastructure is in place. #6 currently stands for the image handling. Search indexes/implementation and RSS feeds need their own tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants