-
Notifications
You must be signed in to change notification settings - Fork 256
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
Options for @scullyio/init:markdown and @scullyio/init:blog #100
Comments
@d-koppenhagen, @xmlking, We should add those options to the |
Ah okay, this seems legit. Probably it should just be documented a bit more clear in the docs. |
But we still need this options in |
So my proposal would be the following:
What do you think? |
in most cases, all posts in a blog have consistent metadata. It would be nice to have an option to specify one or more templates in
for example ---
title: blog 1
description: This is the first demo blog in this sample.
thumbnail: assets/images/blog/sumo-blog2.jpg
keywords:
- PWA
- Angular
- Service Worker
- SSR
- Push Notification
author: Sumo Demo
mail: sumo@demo.com
published: true
publishedOn: 2019-07-24
---
# blog 1
## its a wild world after all
```typescript
console.log('amazing');
```
Related information [blog-2](/home/blog/blog-2)
[site-map](/home/blog) |
picked commits from scullyio#100
@Villanuevand can you have a look at the WIP PR? |
@SanderElias we support all of this meta-tags ? |
I think the meta tags are just passed through and available as key-value-pair in the result. When I used scully I added some very custom meta data and it worked still. I could request them via ScullyRouteService |
But I think we should discuss the suggestion from @xmlking a bit more like:
ng g @scullyio/init:post --metaConfig="meta.config.json" and then the following config will be parsed (just as an example): {
"thumbnail": "assets/images/default.jpg",
"author": "John Doe",
"mail": "John.Doe@example.com",
"keywords": [
"scully"
"angular"
],
"language": "en"
} And finally our meta blog added to a new blog-post would look like this:
whereas the What do you think? |
Or maybe as part of the |
I like the idea of having my default meta tags as JSON in
|
I still don’t know about those flags. The validation of such an option with complex configuration seems to be tricky to me and not really handy. |
I like the idea of having a 'default', However, it should be just a string (can be a multiline string) Hmm, come to think about it. I think it would make sense to create a file with defaults. something like: title: my-blog-post
thumbnail: assets/images/default.jpg
author: John Doe
mail: John.Doe@example.com
keywords:
- angular
- scully
language: en Then the schematic can just read this as a string and inject it in the result. ng g @scullyio/init:post --metaDataFile='defaultBlogHeader.yaml" title="whatEver" |
I like this suggestion! |
@SanderElias here it is: df7500f |
* feat(scully): pick commits for prompts picked commits from #100 * feat(scully): add options for @scullyio/init:markdown * fix(scully): fix x-prompt description * fix(scully): use yyyy-mm-dd format * feat(scully): provide options for @scullyio/init:post * fix(scully): fix filename for post * fix(scully): remove defaults from `route` and `sourceDir` * docs(scully): update options * refactor(scully): split into smaller chainable Rules * test(scully): add tests for ng-add schematic * test(scully): add more schematic tests * feat(scully): add `metaDataFile` option and tests * test(scully): add test for using `target` option * fix(scully): add correct Schema infos for add-blog * test(scully): fix test
🧩 Feature request
When generating a new blog it would be great to have some more Options:
Description
I think it would be good to have at least three more configuration options when creating a blog, to define the basic module name, the source directory for the blog content files and the route for availability of the static pages.
Describe the solution you'd like
baseName
- The basic Name and prefix that's used for theBlogModule
andBlogComponent
, etc. This should be set toblog
by default (with this it wouldn't break the current behavior)sourceDir
- This parameter should define the source directory for the blog files (*.md
). It should be set toblog
by default (with this it wouldn't break the current behavior)route
- This parameter should define the route under which the blog sites are available. It should be set toblog/:slug
by default (with this it wouldn't break the current behavior)A further benefit is that it would allow one to create multiple different blog areas:
This functionality would also affect the generation of new entries:
What do you think?
The text was updated successfully, but these errors were encountered: