Conversation
b99dc35 to
5d3fca1
Compare
ebaabd4 to
6547f4a
Compare
Create destination object that holds a representation of your site. Make DataFiles a default middleware. BREAKING CHANGE: Remove plugins and move to middleware system for extensibility.
BREAKING CHANGE: Using _config.yml is no longer used. You must now use reptar.config.js in place of _config.yml. The main export needs to either be an object which is your config or a function that has to return your config object.
at the appropriate and expected times.
Also clarify error message.
BREKAING CHANGE: All keys in your reptar.config.js have been updated to use camelCase. The keys that must be changed are: url_key -> urlKey date_format -> dateFormat future_date -> futureDate page_size -> pageSize clean_destination -> cleanDestination new_file_permalink -> newFilePermalink.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thoughts on v3:
The overarching goals for V3 is to make Reptar simpler and easier to use.
Removing Plugins, Move to Middleware
Having an API requires maintaining the API, as well as learning how to use the API. It would be better to just use the Reptar instance directly, and any exposed objects and methods on the Reptar instance. This will remove the need to maintain an external API as well as help users of Reptar learn how Reptar itself works, as you'll be interacting directly with Reptar.
This means that
pluginswill be removed from theconfig.ymlfile.You'll only be able to add middleware via a new local (to your project)
reptar.jsfile. This will be considered a more advanced use case and as such will require usage of JavaScript. Sharing of middleware will continue to be done via NPM packages.Question: When you run
reptar buildin your project, if it finds the presence of thereptar.jsfile it will use that to configure middleware. What should it do with that file? Look for an exportedconfigurefunction to call to allow you to configure reptar as you want? I still want to support the rest of the Reptar CLI tools, so there needs to be some way to configure Reptar without replacing it.Remove Collections as a built-in type, have it be a built-in middleware
This is to further emphasize the simplicity of Reptar. Reptar is comprised of utility functions, which help with reading files from the disk and rendering Markdown to HTML and then writing back to disk.
That being the case the
collectionsMiddlewarewill just ingest all the Markdown files in your site and then use them to create Collections and CollectionPages.I have this mostly working locally already. External API should remain the same but this is a step towards being more easily de-coupled from Reptar core.
Data files will also be moved as a built-in middleware
This is even simpler to do and will be done just for organization sake.
Remove and rewrite current 1st-part plugins to be middleware
This is namely
Question with
reptar-html-minifier: This is done after files are rendered. So perhaps there should be support forafterWare- code that runs after Reptar is done running.Rethink Themes
My main problem with how themes work right now is that all they're truly concerned with is defining how to process JavaScript and LESS/SASS files. This leads me to believe that Themes aren't really necessary. What we need to have is someway to define how to process JavaScript/LESS/SASS (asset files).
I'm not sure what that looks like yet but ideally Reptar can understand any
.jsfile in your site and know how to process it. Perhaps it can be as simple as that, process every JS/LESS/SASS file and just copy it over to your destination site.I was worried about a whitelist or blacklist on which files to include or exclude for processing however it's probably safe to process every file. It doesn't mean that every file will be included in your site. So you can have one
main.jsand onemain.lessthat includes other files, and only that file will be included in your template file.