Giter Site home page Giter Site logo

magento / devdocs Goto Github PK

View Code? Open in Web Editor NEW
667.0 419.0 1.8K 548.39 MB

Magento Developer Documentation

Home Page: https://devdocs.magento.com

License: Open Software License 3.0

Ruby 37.58% HTML 30.72% CSS 14.21% JavaScript 17.05% Shell 0.44%
hacktoberfest

devdocs's Introduction

Adobe Commerce Developer Documentation

This project contains the source code of the Adobe Commerce and Magento Open Source developer documentation website for the latest 2.3 release.

Important update

Adobe Commerce and Magento Open Source 2.4.x documentation has been migrated to Adobe sites. See our new landing pages to access the most current information.

Adobe Commerce Developer Documentation (Adobe Developer site)—Develop, customize, integrate, extend, and use advanced capabilities

Adobe Commerce Documentation (Adobe Experience League)—Plan, implement, operate, upgrade, and maintain your Commerce projects

Some content was consolidated or moved to different guides. If you have trouble finding a topic, see the Migrated topics.

We welcome contributions to migrated content! You can find similar links to GitHub on the Adobe sites.

The content at https://devdocs.magento.com is no longer supported since the 2.3 release line has reached end of support.

Building this site

This site is built by Jekyll, which is an open-source tool developed in Ruby.

You can build the site locally in the following ways:

Build locally

You do not need to set up a webserver to serve the site locally. Jekyll will use its own webserver for this.

Set up Ruby

Consider to set up the Ruby version defined in .ruby-version. Ruby version manager such as rvm or rbenv can help to manage the correct version for this automatically.

See official documentation for the most recent installation guidelines and available options.

Install devdocs

Clone the repository. The first time you are at the devdocs directory, run:

bundle install

The website file structure contains directories pulled from multiple sources, not only this repository. The full list with mapped directories is defined in the Docfile.yml. It includes public and private repositories. To pull all the mapped sources:

rake init

Docfile begins with public sources, because the rake init task fails when it attempts to clone content from private repositories without the corresponding permissions.

NOTE By default rake clones using SSH. If you want to clone with HTTPS, you can run it with the token variable:

token=none rake init

Use none if you do not want to use a real token. To have access to private repositories, you will need a GitHub token with the relevant access permissions.

TIP All the helper CLI commands for this project are implemented using rake. Use the rake --tasks command for a complete list of available tasks, or filter the list using a keyword, such as rake --tasks test.

Once you have completed preparing your environment, you can build locally and preview the site in your browser.

Run the website

  1. Using the following rake task, verify all the required dependencies and start the embedded web server:

    rake preview

    You will see the commands called by the rake task and the corresponding output. Each command is typically highlighted with the magenta color:

    ~/magento/devdocs (master)$ rake preview
    Install gems listed in the Gemfile: $ bundle install
    Using rake 13.0.1
    Using public_suffix 4.0.3
    <truncated>
    Bundle complete! 16 Gemfile dependencies, 70 gems now installed.
    Use `bundle info [gemname]` to see where a bundled gem is installed.
    Installed!
    Cleaning after the last site generation: $ bundle exec jekyll clean
    Configuration file: /Users/user/magento/devdocs/_config.yml
              Cleaner: Removing /Users/user/magento/devdocs/_site...
              Cleaner: Removing src/.jekyll-metadata...
              Cleaner: Removing src/.jekyll-cache...
              Cleaner: Nothing to do for .sass-cache.
    Clean!
    Enabled the default configuration: $ bundle exec jekyll serve --incremental \
                                    --open-url \
                                    --livereload \
                                    --trace \
                                    --plugins _plugins,_checks
    Configuration file: /Users/user/magento/devdocs/_config.yml
    Theme Config file: /Users/user/.rvm/gems/ruby-2.6.5/bundler/gems/devdocs-theme-e1a4ff6880d5/ _config.yml
                Source: /Users/user/magento/devdocs/src
          Destination: /Users/user/magento/devdocs/_site
    Incremental build: enabled
          Generating...
    Running ["ImageCheck", "HtmlCheck", "LinkCheck", "ScriptCheck",  "LinkChecker::DoubleSlashCheck"] on ["/Users/user/magento/devdocs/_site"] on *.html...
    
    
    Ran on 1747 files!
    
    
    HTML-Proofer finished successfully.
                        done in 220.316 seconds.
    Auto-regeneration: enabled for 'src'
    LiveReload address: http://127.0.0.1:35729
        Server address: http://127.0.0.1:4000/
      Server running... press ctrl-c to stop.
            LiveReload: Browser connected
    
  2. The generated website launches automatically in a new tab in your browser.

  3. Press Ctrl+C in the serve terminal to stop the server.

TIP Leave the serve terminal open and running. Every time you save changes to a file, it automatically regenerates the site so you can test the output immediately. Changing the _config.yml file or other YAML file with data or configuration requires a fresh build (stop and start the server again with rake preview).

Building old versions

The published website contains documentation for the latest 2.3.x Adobe Commerce and Magento Open Source release only. For cases, when you need to view the content as it was for an earlier release, we created tags in this repository. Typically, they point at the commit when the release notes were finalized and published.

To view the list of available tags:

git tag --list

To checkout the version (for example 2.2.0):

git checkout 2.2.0

Find guidelines for building the site locally in the checked out README.

NOTE There is no guarantee the site will be built, since it can have dependencies on the external resources that are not available anymore.

Archived docs

To view the archived documentation, see https://commerce-docs.github.io/devdocs-archive/.


Our public channels:

devdocs's People

Contributors

abrarpathan19 avatar almarchenko avatar atwixfirster avatar bdenham avatar belbiy avatar ccondra avatar danidelcar avatar difleming avatar dmrachkovskyi avatar dobooth avatar dshevtsov avatar eduard13 avatar erikmarr avatar gamarshall avatar hguthrie avatar hickskenh avatar jcalcaben avatar jeff-matthews avatar jfrontain avatar jhadobe avatar keharper avatar lambc40p avatar mage2pratik avatar magento-docs avatar magento-team avatar marchenk-adobe avatar meker12 avatar shrielenee avatar tdobbs avatar thiaramus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devdocs's Issues

Imported CSS line very long restricting contributions

I was looking to make a contribution to resolve some issues with the site responsiveness but the majority of the css (160,000 characters) is on one line:

https://github.com/magento/devdocs/blob/develop/css/app.css#L275

I presume this is a side-effect of some import process from another site/repository.

Would you be able to import it so that it maintains formatting? I tried converters myself but I couldn't be sure that it wasn't introducing bugs.

Alternatively, can you can confirm that this is a long-term restriction and will be continually re-imported and therefore any contributions need to re-define selectors and overwrite any statements included here.

Thanks

Architecture > Theme Overview incorrect statement

Currently /guides/v1.0/architecture/arch_themes.md states:

Each theme contains a theme.xml file, which defines the name and version of that theme, as well as the name of the parent theme, if any.

It is my understanding that this is incorrect and that the composer.json file in the theme is responsible for the version and parent information. According to magento/magento2#840 this may be changing but the docs as they stand are incorrect.

Add favicon to the http://devdocs.magento.com/

It would be nice if http://devdocs.magento.com/ had a favicon specified. The default Magento icon is an obvious choice, but something more specific might be nice. 16x16 isn't much space to work with, but it would be cool if a document icon could somehow be merged with a Magento icon. Maybe the Magento logo inside of a document. Not sure if the Magento logo guidelines would allow for this usage, but if you think it might be a good idea, let me know and I'll mockup a concept in Photoshop.

Serving with jekyll

I'm trying to build the site with jekyll like it says in the readme. I'm running on windows 7 64 bit. I renamed _config.devdocs.yml to _config.yml. When I run "jekyll serve" I get the following output:

C:\Users\CNCOLE\Documents\GitHub\devdocs>jekyll serve
Configuration file: C:/Users/CNCOLE/Documents/GitHub/devdocs/_config.yml
Source: C:/Users/CNCOLE/Documents/GitHub/devdocs
Destination: C:/Users/CNCOLE/Documents/GitHub/devdocs/_site
Generating...
Liquid Exception: Failed to get header. in guides/v1.0/architecture/backward-compatibility.md
jekyll 2.5.3 | Error: Failed to get header.

Add quick start for module development to Extension Developers section

I'm sure you have this on your backlog, but adding a quick tutorial like the guest post on Alan Kents blog soon would be very important now that all developers are to play around with Magento 2 in the Dev Beta.

Allow me to quote myself:

Excellent post, Dale! Please add an introduction like this to the Extension Developers section of http://devdocs.magento.com/.
The documentation team pretty much could copy and paste the text as it covers the most important bits to get going. There’s always time to refine and expand on it later but most developers are checking the dev docs now and may be missing such a tutorial.

Redis - Suggestions on improving the documentation

Hi,

For the page: http://devdocs.magento.com/guides/v2.0/config-guide/redis/config-redis.html - I suggest we make the documentation more self-contained.

By this I mean, there are lots of links in the documentation of information that I believe should really be in the documentation itself.

Some examples are:

  • The ECG PDF information about: Redis settings, information on how to calculate some of the Redis settings (like memory limit), cleaning old tags script (is it available for M2?), etc. This should be added to the documentation.
  • From the digital ocean link: how to install Redis.
  • From the further external links: installation procedure, command line usage, etc.
  • Impacts of catalogue size (or other information) into the amount of memory used by Redis, etc.
  • etc.

The external links for blog posts might not be available some time in the near future so I guess a more stand-alone communication is preferable. Links to official documentation are more reliable though.

Thanks!

Scopes in which plugins can be used.

So reading the docs on plugins it says "Limitations: You cannot use plug-ins for: Non-public methods". However in my testing I was able to create a Plugin for a protected method without an issue, should this read private methods?

Registration.php is not mentioned in theme documentation

I am working on my first magento 2 theme. I created all the required files defined by the documentation, but my theme did not show up under "Content => Design => Themes".

Using the luma theme as an example I created a registration.php file in the root of my theme. Now it shows up in the config.

Is this a temporary solution or is it just missing in the documentation?

Missing _config.yml breaks some links and images

After a fresh clone on my local machine (specifically, commit 814d69e at this time of writing), running $ bin/jekyll serve results in a semi-working docs site.

The Magento logo on the homepage is missing:

logo-missing

At least some of the links on the site are broken (notice the duplicated api in the URL):

broken-url

The broken images and links in question require values from the recently deleted _config.yml file. Either the content should be updated to not require those configuration values anymore, or the _config.yml should be restored.

add placeholders for new Topics

While the current documentation looks very clean and well structured, it is still missing a lot of parts.
That is not a problem, but it makes contribution of complete new parts harder, as there are not enough patterns to follow currently.

Examples:

  • Where would I add a tutorial about replacing the default Search engine.
  • What would be a good place to describe the Interval pattern, how to extend it and what problems it should resolve

"Object that cannot be instantiated by the object manager."

On the Dependency Injection page, there is a section that says:

"Object that cannot be instantiated by the object manager."

Technically there is nothing in the code that prevents this. (e.g. You can instantiate some of the named types using the object manager). There are many reasons why you shouldn't (which are explained correctly on the page) but I wouldn't call them "non-injectable". I would try to expand on what the differences are between "injectable" and "non-injectable" because from the text, I wouldn't know when to use factories and when to use the type as a singleton itself.

Small Padding to .page-intro

I suggest adding a small amount of padding (think a 14px padding-left) on the .page-intro class would make the headings look better.

Before:
image

After:
installation_overview

Thoughts?

Page Cache

I'm not seeing much documentation regarding page caching and block caching in the documentation. There is also the topic of private data, and how private data is utilized surrounding caching.

There was a blog article by Alan Kent last December that provides some concepts and overview of what was in development at the time, but I'm looking for what the pieces are now, and how to use them.

In a layout block declaration you can define the block as cachable=false, but I've seen instances such as the product detail page where my additional blocks end up getting cached still even with that block declaration. It also looks like any page that has layout block elements with cachable=false will not utilize private block replacement.

I have a block on a product detail page that is rendered depending on if a custom product attribute exists, and the content in the block is different per visitor depending on the value of a cookie. The cookie value can change based on the visitor's preference, so the content in the block could change at any point, but is specific to the visitor.

Incorrect gist in indexing guide

A gist intended to show an example of Merchandising/etc/indexer.xml is embedded on line 267 in /guides/v1.0/architecture/index-cache/indexing.md.

This is incorrectly displaying a duplicate example of the Merchandising/etc/mview.xml.

ServiceContracts DesignPatterns: Data now Mutable

In the Service Contracts sub page about Design Patterns there are references to Data Interfaces/Objects being immutable but the codebase and strategy has changed to allow for mutable Data. References to immutability and to builders need to be removed.

Suggestions to improve the Frontend Developer Guide content concerning blocks

I've been spending a lot of time this weekend with the Frontend Developer Guide - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/bk-frontend-dev-guide.html - and I've noticed two areas that it could potentially be improved in that I wanted to suggest:

  1. More content about Blocks - specifically, create a section about Blocks on the same level (and with the same details) as Layout and Templates. Right now there's content on Blocks scattered throughout the guide as it comes up. I think it would be helpful (especially for developers new to any version of Magento) to have Blocks called out in their own section before the Layout section.
  2. I couldn't find any mention of CMS/static blocks and how to add those to themes and the fact that users can edit them from the admin panel.

Varnish documentation missing some points

Hi All,

Most of the doubts regarding FPC in general (and also Varnish now) are related to its usage and a page life-cycle in cache. I believe the current documentation is missing:

  • How to purge data in Varnish from Magento admin.
  • Which actions in the backend are likely to generate a purge, and to which URL.
  • Static assets cached by Varnish: how to replace them?

Please let me know what are your thoughts on the above.

Thanks!

PDF Versions of the Devdocs should be made available

Creating from a discussion that started on Twitter: https://twitter.com/JoshuaSWarren/status/634727275452239872

Basically - a PDF version (either an on-the-fly PDF generation, or more likely, a pre-generated PDF that's refreshed periodically) of the devdocs would be great. It would allow the docs to be loaded onto ereaders, tablets, etc., and used in offline situations, or downloaded as a complete set before boarding a flight without wifi, etc.

There was a suggestion on Twitter at https://twitter.com/knowj/status/634729093016199168 - "You could clone the repo and build using jekyll as a stop gap. PDF's would be nice as well."

This got me to thinking that maybe there's a way to use Jekyll + https://github.com/pdfkit/PDFKit to automatically generate these PDFs. It wouldn't be the prettiest layout, but it'd be a start.

Memory size limitted

I'm getting this error message when install sample data as below. Just wonder how much memory does it need to allocate?

Also, any way we can re-install data?

CLI >> bin/magento sampledata:install admin
Installing theme:
.
Installing customers:
.
Installing CMS pages:
....
Installing catalog attributes:
...........................
Installing categories:
.........................................
Installing simple products:
............................................
Installing bundle products:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /var/www/shop.getbraise.com/html/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 221

Distinction Between Code Generation and Compiled Mode

Hey all -- just a few suggestions here based on some limited real world explorations. I'm not sure what "the right" answer is, but the current documentation about these subjects is/are a little confusing to an outsider.

This is regarding the documentation on "single-tenant" and "multi-tenant" compilation
http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler-single.html
http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler-multi.html

Each of these pages indicate (or imply heavily) that Magento 2 compilation is the the same thing as code generation

This section discusses the basics of code compilation (which is also referred to as code generation).

However, I'm not sure that's 100% true -- compilation seems to be something more.

While running either of the compiler commands will generate class files in var/generation, compiling also creates a number of .ser files in var/di/ (in this context .ser appears to be PHP's internal serialization format).

The purpose of these files isn't clear.

Also, if these .ser files are present, the framework seems to run in some sort of "Compiled" mode

#File: /lib/internal/Magento/Framework/App/EnvironmentFactory.php
private function getMode()
{
    if (file_exists(ConfigLoader\Compiled::getFilePath(Area::AREA_GLOBAL))) {
        return Compiled::MODE;
    }

    return Developer::MODE;
}

I found this out because removing the files in var/generation/ while in compiled mode appears to break the system. I needed to remove the .ser files as well to restore normal functionality.

If possible, it'd be great if the docs could explain how "compiled" code goes above and beyond simply pre-generating all generated code. This information is going to be of particular importance as developers start rolling out Magento 2 systems into production.

Layout broken on /guides/v1.0/architecture/view/page-type.html

This page looks ok in Github, but at http://devdocs.magento.com/guides/v1.0/architecture/view/page-type.html the page layout is broken. It looks like this is due to line 25 where "<ModuleName>" is not escaped.

I didn't want to do a pull request as I cannot definitively test the change and see if it fixes the problem, reason being that http://devdocs.magento.com is converting the markdown and I cannot replicate that. Unless there is some way?

Slider for Magento 2

Hi,

I don't see ideas about Slider for Magento 2. For example, Javascript lib should be used and how to create an example slider. Any idea about my point? If I can, I will contribute to this point.

Thanks!

composer.json example for Module dependencies question

Firstly in: /guides/v1.0/architecture/modules/mod_depend.html there is a problem on line 48 where <Vendor> is not being displayed due to not being escaped.

Although this calls into question whether <Vendor> should just be "Magento" anyway? Based on the content of the example? (name being magento/module-catalog)

Path needs adjustment in Running Composer ...

In "Running Composer to update dependencies"
"Change to the Magento installation directory and run composer install. For example,
cd /var/www/html/magento2 && composer install"

/var/www/html/magento2 will apply for Centos but Ubuntu has /var/www/magento2

There is no documentation available for Source Models, Backend Models, and Frontend Models

It would be great if there was documentation on what Source Models, Backend Models, and Frontend Models existed within default Magento. I imagine this could be updated either manually or via a script by searching for classes that are not abstract and that implement the appropriate interface. I expect that this would be the case for more than just these models including things like models available through the service layer.

Missing area from "Modules and Areas"

In /guides/v1.0/architecture/modules/mod_and_areas.md, it mentions that "In Magento there are six Areas". However it only lists 5 areas? I presume the missing one is "crontab"?

Although this is at odds as to what is stated about areas on /develop/guides/v1.0/architecture/areas/areas.md, this mentions "install" as an area, but mod_and_areas.md has "doc"?!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.