Skip to content

Latest commit

 

History

History
151 lines (99 loc) · 5.42 KB

CONTRIBUTING.md

File metadata and controls

151 lines (99 loc) · 5.42 KB

Contributing


Contributing in lbry.org is EASY AS HELL
So let's get started 😉:


Prerequisites :


  • Markdown Editor [i.e Typora] / Code Editor [i.e VsCode] Or A Simple notepad Editor .
  • Some Basic Knowledge in Markdown Syntax [If editing a markdown based Page]
  • Some Basic knowledge in HTML Syntax [If editing an HTML based page]

Method 1: Through GitHub


Well You can easily edit any file on github. For example if you want to edit a few words or some typos.
To do that :

  • Create an GitHub Account
  • Navigate to the file you want to edit [i.e. swarm.md]

swarm image

  • After clicking on that will open this 👇 Page. full swarm

  • Click on the edit 🖊 icon in Top Right

  • A fork will be created and you can submit your changes with a Pull Request


Method 2: Cloning Locally


  • To clone locally you need Git . Or for easier Git management you can use GitKraken
    Clone address :
    https://github.com/LBRYians/lbry-org-new.git
  • Open the desired file in your favourite editor
  • Edit and save the changes
  • Commit and Push

Understanding Markdown Font Matter


Every MD file contains these Font Matters : Fontmatters

  • title: Title appears as a Heading on top of every page like this 👇 Heading

  • subhead: Subhead stands for Sub-heading Like this 👇 subhead You can use emojis which must be in :emojiname:format

  • bg-image: You can add Customized background images for each pages . To do that upload your image in /img then copy the relative path and paste it here.

  • layout: Layout refers to the page layouts included in _layout Folder. Default is the common layout for most pages.

  • permalink: Permalink is a relative path to pages. Usually pages exist in root directory. The format is /Pagename/ For example in Swarm page It's /swarm/


Libs AKA Assets


All assets [Except images] are loaded from /libFolder

  • _includes: Contains header , head , nav and footer of default.html

  • /img folder contains all the images used in the site

  • /lib/ :

    • bootstrap: Contains all bootstrap ingredients

    • css: Contains all the css used in both homepage and and article pages

    • fontawesome: Contains awesome fonts

    • fonts/oxygen: Contains "oxygenfonts" from google

    • jquery: Of course jquery script 🙂

    • JS: contains all the JS scripts used in the site


Editing an existing page


Editing an existing page is as easy as breaking a wall with a Pin [Just a Joke 😉]

  • Markdowns:
    Most Text rich pages pull their Text contents from Markdown files located in root directory. To edit simply Locate the related markdown / .md file and Edit it using a text editor with Proper Syntaxes

  • HTML:
    Homepage and layout > Default.html [in ./_layouts] can be easily edited using a Code Editor . For more references those codes are Well-commented.


Adding New pages


Adding new pages are easy as breathing [Well in most cases 😛] .

  • Step 1: Create

    Create and upload a markdown file using this layout

    ---
    title : Pagetitle
    subhead : Some funky and simple subheading :emoji:
    bg-image : "../img/pathtoBackGround-Image.png"
    layout : layoutname [default]
    permalink : /filename/
    ---
    Markdown based content and stylings
    blah blah blah
    blah blah blah
    The End
  • Step 2: Add in ./_includes/navlinks.html

    Scroll down to NavLinksPart for HOMEPAGE section which starts and ends with <!-- NavLinksPart for HOMEPAGE --> comment

    add a line <a class="nav-item nav-link" href="./asinpermalink/">PageName</a>

  • Step 3: Add in ./_includes/navlinks.html

    Scroll down to NavLinksPart for DefaultLayoutsPages section which starts and ends with <!-- NavLinksPart for DefaultLayoutsPages --> comment

    add a line <a class="nav-item nav-link" href="../asinpermalink/">PageName</a>

    Save 🍺

    NavLinks

Remember : In NavLinksPart for HOMEPAGE there is one dot[./] in <a>---href=""<a> But in NavLinksPart for DefaultLayoutsPages there's TWO DOTS [../]

So don't copy paste same thing in two places 😉 .


Adding a new layout


All new layouts goes into _layouts folder . Try to keep it's name case insensitive and easily readable.

Head to jekyll docs for more detailed explaination about creating layouts .

Which ever layout you create make sure **NOT TO CREATE NEW CODES THAT ARE ALREADY MADE ** in _includes Most importantly the Nav bar