Synopsis

The purpose of this module is to export Drupal 8 nodes in the form of Markdown files. The principal objective behind this module to facilitate the JAMStack based architecture where decoupling of Drupal (from its presentation layer) is required.

This module can generate markdown files in both online and offline(via drush command) mode and these files will be stored under files directory.

Requirements

Markdownify is a packagist repo, which helps to convert html to markdown

NA

Roadmap

* D8 module should have the Markdownify as composer based package
* BitBucket API to integrate
* All field types to match, reference fields are yet to be done

Known problems

Reference fields are not converting

Pledges

Cheerful that the project will be ready in Drupal 8 and will be helpful to developers working in JAMstack

Credits

* Ramit Mitra actually published the project with all todos completed
* Samajit Das started the project with an idea behind JAMstack

Project link

https://www.drupal.org/project/markdown_exporter

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/markdown_exporter.git

PAReview checklist

* 7.x: https://pareview.sh/pareview/https-git.drupal.org-project-markdown_expor...
* 8.x: https://pareview.sh/pareview/https-git.drupal.org-project-markdown_expor...

Comments

aniruddhab created an issue. See original summary.

vernit’s picture

Issue summary: View changes
vernit’s picture

There are lots of issue occurs while PAReview. Please resolve all of them. Thanks in advance.

vernit’s picture

Status: Needs review » Needs work
avpaderno’s picture

Status: Needs work » Needs review

A review should not simply report there are issues to fix, but also give a short description of what those issues are.

avpaderno’s picture

Status: Needs review » Needs work

On the project used for this application, there are 14 commits done from ramit.mitra and 7 done from aniruddhab (for the 8.x-1.x branch).
Since the purpose of these applications is verifying what the user who applies understands about writing secure code that correctly uses the Drupal APIs and follows the Drupal coding standards, we cannot review code written from more users to understand what a single user understands of writing Drupal code.

If you want to become a vetted user who can opt into security coverage for the maintained projects, you need to apply using a project/branch where you committed most of the code, if not all.

aniruddhab’s picture

Hi @kiamlaluno,

The branch 8.x-1.x is a branch where I only have committed. So please check commit on a single branch and let me know issues are getting.

Thanks,
Aniruddha

aniruddhab’s picture

Hi @Vernit,

I am working on the PAReview issues.

Thanks,
Aniruddha

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Actually, for the 8.x-1.x branch there are commits from other users too, for example in markdown_exporter.drush.inc. We cannot review a project for which it is necessary to check every commit to understand exactly which user has done each change.

If the purpose of these applications were to check the code quality, we would not care of which user changed the code. The purpose of these applications is instead understanding what the user who applies understands on writing secure code that follows the Drupal coding standards, and correctly uses the Drupal APIs, which means we do care of which user wrote the code.

aniruddhab’s picture

Hi @Vernit,

Check the PAReview list once: https://pareview.sh/pareview/https-git.drupal.org-project-markdown_expor...

Thanks,
Aniruddha

aniruddhab’s picture

Hi @kiamlaluno,

The file has been removed. I guess the branch is clean now, you need to review once.

Thanks,
Aniruddha

aniruddhab’s picture

Issue summary: View changes
aniruddhab’s picture

Issue summary: View changes
batkor’s picture

hi
Where drush commands? :-)
Please correct construct method in
https://git.drupalcode.org/project/markdown_exporter/blob/8.x-1.x/src/Fo...
must

/**
   * ContentTypeFieldMappingSettings constructor.
   *
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   * @param \Drupal\Core\Entity\EntityTypeManager $entity_type_manager
   * @param \Drupal\Core\Entity\EntityFieldManager $entity_field_manager
   */
  public function __construct(
    ConfigFactoryInterface $config_factory,
    EntityTypeManager $entity_type_manager, 
    EntityFieldManager $entity_field_manager
  ) {
    parent::__construct($config_factory);
    $this->entityTypeManager = $entity_type_manager;
    $this->entityFieldManager = $entity_field_manager;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('config.factory'),
      $container->get('entity_type.manager'),
      $container->get('entity_field.manager')
    );
  }

Use Json:decode instead json_decode

aniruddhab’s picture

Issue #15 has been updated, please check

ankush_03’s picture

Hi aniruddhab,

Remove commented code from routing file
# markdown_exporter.github_auth_modal:
# path: '/admin/config/development/markdown_export/github-authentication/modal-open'
# defaults:
# _form: 'Drupal\markdown_exporter\Form\GitHubAuthModal'
# _title: 'GitHub Authentication'
# requirements:
# _permission: 'administer site configuration'

Service file :

services:
# markdown_exporter.entity_schema_subscriber:
# class: Drupal\markdown_exporter\EventSubscriber\MarkdownExporterEntitySchemaSubscriber
# arguments: ['@entity.manager']
# tags:
# - { name: 'event_subscriber' }

# core_file_system:
# class: Drupal\core\File\FileSystemInterface
# Drupal\core\File\FileSystemInterface: '@core_file_system'

avpaderno’s picture

Please remember to change status when the project has been fixed as per reviews.

aniruddhab’s picture

ankushgautam76@gmail.com, commented code has been removed, please check

aniruddhab’s picture

upon all such changes, I am wondering, when all those issues will be fixed, and project actually goes live....

shaktik’s picture

There are some coding standards issues to be fixed in the README.md file.

FILE: ...ar/work/drupal-8/web/modules/contrib/markdown_exporter/README.md
----------------------------------------------------------------------
FOUND 1 ERROR AND 13 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
  11 | WARNING | [ ] Line exceeds 80 characters; contains 245
     |         |     characters
  13 | WARNING | [ ] Line exceeds 80 characters; contains 144
     |         |     characters
  35 | WARNING | [ ] Line exceeds 80 characters; contains 83
     |         |     characters
  41 | WARNING | [ ] Line exceeds 80 characters; contains 141
     |         |     characters
  57 | WARNING | [ ] Line exceeds 80 characters; contains 101
     |         |     characters
  59 | WARNING | [ ] Line exceeds 80 characters; contains 245
     |         |     characters
  61 | WARNING | [ ] Line exceeds 80 characters; contains 144
     |         |     characters
  88 | WARNING | [ ] Line exceeds 80 characters; contains 103
     |         |     characters
  89 | WARNING | [ ] Line exceeds 80 characters; contains 209
     |         |     characters
  90 | WARNING | [ ] Line exceeds 80 characters; contains 106
     |         |     characters
  91 | WARNING | [ ] Line exceeds 80 characters; contains 155
     |         |     characters
  97 | WARNING | [ ] Line exceeds 80 characters; contains 130
     |         |     characters
  99 | WARNING | [ ] Line exceeds 80 characters; contains 95
     |         |     characters
 106 | ERROR   | [x] Expected 1 newline at end of file; 8 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 512ms; Memory: 10Mb
avpaderno’s picture

Priority: Normal » Minor
aniruddhab’s picture

Status: Needs work » Fixed
aniruddhab’s picture

Issues reported in this process, are fixed by RC

aniruddhab’s picture

Status: Fixed » Needs review
aniruddhab’s picture

Priority: Minor » Major
avpaderno’s picture

Priority: Major » Minor
klausi’s picture

Priority: Minor » Normal
Status: Needs review » Fixed
  1. permission file: "run markdown export" is unused. did you mean to use it for your routes in teh routing file?
  2. markdown_exporter_entity_update(): if you are only targeting nodes then you should use hook_node_update() instead. Same for markdown_exporter_entity_insert().
  3. class MarkdownExporterEntitySchemaSubscriber seems unused, can it be removed?
  4. The function variable_get() does not exist anymore in Drupal 8, looks like your code does not work?
  5. GitHubAuthSettings.php.bk: all backup files should be removed from the repository.

Although the module will probably not run on Drupal 8 because it might have some fatal errors (because variable_get() dores not exist) I don't see security issues.

Thanks for your contribution, Aniruddha!

I updated your account so you can opt into security advisory coverage now.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

aniruddhab’s picture

Assigned: Unassigned » aniruddhab
Priority: Normal » Major
aniruddhab’s picture

Can anyone please help me to reopen the issue, I am one of the maintainer, still can not change the status.

klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

You have the git vetted user role, so everything should be ready for you to opt into security coverage in your project. Can you set the option when you edit your project at https://www.drupal.org/node/3055800/edit ?

aniruddhab’s picture

hi klausi, first of all many thanks. I can see the opt in option in edit page. Also I have joined in to the group of reviewers.

However the issues you mentioned in #28, I am working on along with Drupal 9 compatibility with Drupal-checker.

klausi’s picture

Status: Postponed (maintainer needs more info) » Fixed

Nice, then I think we can close this again.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.