-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/move files #124
Feat/move files #124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment.
Separately, I wonder if removing and adding to the collection config should be abstracted away into the methods of the File
type. Will follow up offline
const collections = await IsomerCollection.list() | ||
|
||
// Check if collection already exists | ||
if (!collections.includes(targetCollectionName) && targetCollectionName !== 'pages') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check that target collection name is not one of the ISOMER_TEMPLATE_DIRS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, we will check for any of the protected folder names created by jekyll regardless of whether they are prepended with an underscore. This check has been added to the create method in the Collection
class in fde311c, while pages
will continue to be used to indicate a move to unlinked pages.
4d1f85f
to
c600e85
Compare
As discussed offline, we will be extending the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks to PR #124 on the backend isomerpages/isomercms-backend#124, we can simplify the file-moving logic in `OverviewCard` since `OverviewCard` is now used only for unlinked pages in the workspace (it is also used for Resource Category display, but these do not have any move file functionality). This allows us to remove all the complex logic associated with file-moving and replace it with a single API call to the new file moving endpoint. This also allows us to delete the now-unused util function `saveFileAndRetrieveUrl`.
* Nit: config indentation * Feat: update list for collection to not use _config.yml file * Refactor: use new list method when retrieving folders * Feat: add page moving endpoints for collections and unlinked pages * Fix: missing import in config class * Feat: add check for special directory names * Feat: add third nav parameter to front matter * Fix: remove unused import
This PR introduces new endpoints to handle the moving of multiple files from one folder to another. To be reviewed in conjunction with PR #369 on the isomercms-frontend repo.
In addition, this PR also updates the existing list() method of collections to work with both the existing format as well as the file format post jekyll 4.0 update.
Resolves issues #116 and #120