فهرست منبع

Update website copy

Jordi Boggiano 13 سال پیش
والد
کامیت
7242a4959e

+ 1 - 1
src/Packagist/WebBundle/Resources/public/css/main.css

@@ -269,7 +269,7 @@ p {
   margin-right: 4%;
 }
 
-.recent-packages, .recent-versions {
+.publishing-packages {
   float: right;
   width: 48%;
 }

+ 1 - 0
src/Packagist/WebBundle/Resources/translations/messages.en.yml

@@ -6,3 +6,4 @@ menu:
   logout: Logout
   login: Login
   register: Register
+  browse_packages: Browse Packages

+ 1 - 1
src/Packagist/WebBundle/Resources/views/About/about.html.twig

@@ -8,7 +8,7 @@
     <h1>How to submit packages?</h1>
     <h2>Naming your package</h2>
     <p>First of all, you must pick a package name. This is a very important step since it can not change, and it should be unique enough to avoid problems in the future.</p>
-    <p>The most important part is that the first bit of the package name must be the vendor name, suffixed by a forward slash (/). This follows the <a href="https://github.com/weierophinney/fig-standards/blob/master/accepted/PSR-0.md">PSR-0 standard</a> for namespaces naming.</p>
+    <p>The most important part is that the first bit of the package name must be the vendor name, suffixed by a forward slash (/). This follows the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0 standard</a> for namespaces naming.</p>
     <p>For libraries and applications, the vendor is in most cases the library name itself, and you can use any name, although it's best to avoid using common names like DB, Logger, MySQL, etc. Try to be imaginative when naming your project.</p>
     <p>For plugins, be it TYPO3 extensions, Symfony2 bundles, Drupal modules, or whatever your project of choice calls them, you are free to handle it as you wish, but you may want to add some specific information about the target platform in the package name to avoid conflicts if you provide many plugins to integrate one lib in many frameworks. For example, if your vendor name is Acme, and your library is called Email, you could have the following names: <code>acme/email-symfony-bundle</code>, <code>acme/email-typo3-ext</code> and such. This ensures uniqueness across frameworks/applications, and clearly says what your package relates to. Here is a list of typical package names for reference:
 <pre>

+ 33 - 10
src/Packagist/WebBundle/Resources/views/Web/index.html.twig

@@ -15,26 +15,49 @@
     }
 }
 </pre>
-            <h2>Installing Composer In Your Project</h2>
+            <h2>Install Composer In Your Project</h2>
             <p>Run this in your command line:</p>
             <pre>
 wget http://getcomposer.org/composer.phar
 </pre>
             <p>Or <a href="http://getcomposer.org/composer.phar">download composer</a> into your project root.</p>
-            <h2>Installing Dependencies</h2>
+            <h2>Install Dependencies</h2>
             <p>Execute this in your project root.</p>
             <pre>
 php composer.phar install
 </pre>
+            <h2>Autoload Dependencies</h2>
+            <p>If all your packages follow the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0</a> standard, you can autoload all the dependencies by adding this to your code:</p>
+            <pre>
+require '.composer/autoload.php';
+</pre>
+            <p>The .composer directory will be created besides the composer.json file, so adjust the path if needed</p>
+
+            <p><a href="{{ path('browse') }}">Browse</a> the packages we have to find more great libraries you can use in your project.</p>
         </div>
     </section>
-    <section class="recent-packages">
-        <h1>Most Recent Packages</h1>
-        <div></div>
-    </section>
-    <section class="recent-versions">
-        <h1>Most Recent Versions</h1>
-        <div></div>
+
+    <section class="publishing-packages">
+        <h1>Publishing Packages</h1>
+        <div>
+            <h2>Define Your Package</h2>
+            <p>Put a file named <em>composer.json</em> at the root of your package, containing this information:</p>
+            <pre>
+{
+    "name": "your-vendor-name/package-name",
+    "require": {
+        "php": ">=5.3.0",
+        "another-vendor/package": "1.*",
+    }
+}
+</pre>
+            <p>This is the strictly minimal information you have to give.</p>
+            <p>For more details about package naming and the fields you can use to document your package better, see the <a href="{{ path('about') }}">about</a> page.</p>
+            <h2>Commit The File</h2>
+            <p>You surely don't need help with that.</p>
+            <h2>Publish It</h2>
+            <p><a href="{{ path('fos_user_security_login') }}">Login</a> or <a href="{{ path('fos_user_registration_register') }}">register</a> on this site, then hit the big fat green button above that says <a href="{{ path('submit') }}">submit</a>.</p>
+            <p>Once you entered your public repository URL in there, your package will be automatically crawled periodically. You just have to make sure you keep the composer.json file up to date.</p>
+        </div>
     </section>
->>>>>>> Update homepage and some URLs
 {% endblock %}

+ 4 - 1
src/Packagist/WebBundle/Resources/views/layout.html.twig

@@ -44,7 +44,7 @@
                 <h1><a href="{{ path('home') }}">Packagist</a></h1>
                 <h2>The PHP package archivist.</h2>
                 {% if page|default('') == 'home' %}
-                    <p>Packagist is the main <a href="{{ path('about.composer') }}">Composer</a> repository. It aggregates all sorts of PHP packages that are installable with Composer.<br /><a href="{{ path('browse') }}">Browse packages</a> or <a href="{{ path('submit') }}">submit your own</a> (<a href="{{ path('about') }}">learn how</a>).</p>
+                    <p>Packagist is the main <a href="{{ path('about.composer') }}">Composer</a> repository. It aggregates all sorts of PHP packages that are installable with Composer.<br /><a href="{{ path('browse') }}">Browse packages</a> or <a href="{{ path('submit') }}">submit your own</a>.</p>
                 {% endif %}
             </header>
 
@@ -81,6 +81,9 @@
                         <li><a href="{{ path('fos_user_security_login') }}">{{ 'menu.login'|trans }}</a></li>
                     {% endif %}
                 </ul>
+                <ul>
+                    <li><a href="{{ path('browse') }}">{{ 'menu.browse_packages'|trans }}</a></li>
+                </ul>
             <div class="clearfix"></div>
         </footer>