|
1 |
| -# What is Flynt? |
| 1 | +# flynt-documentation |
| 2 | +[](https://github.com/RichardLitt/standard-readme) |
2 | 3 |
|
3 |
| -Flynt is a component based WordPress framework for development teams and their clients. |
| 4 | +> Source for the [Flynt Framework documentation](https://docs.flyntwp.com). |
4 | 5 |
|
| 6 | +## Table of Contents |
5 | 7 |
|
6 |
| -## Philosophy |
7 |
| -<!-- TODO: Write this section. --> |
| 8 | +- [Install](#install) |
| 9 | +- [Usage](#usage) |
| 10 | + - [Adding menu items](#adding-menu-items) |
| 11 | + - [Versioning](#versioning) |
| 12 | + - [Adding Redirects for old content](#adding-redirects-for-old-content) |
| 13 | +- [Maintainers](#maintainers) |
| 14 | +- [Contribute](#contribute) |
| 15 | +- [License](#license) |
8 | 16 |
|
9 |
| -## Ecosystem |
10 |
| -<!-- TODO: Write this section. --> |
| 17 | +## Install |
11 | 18 |
|
12 |
| -## Resources / Next Steps |
13 |
| -<!-- TODO: Write this section. --> |
| 19 | +1. Clone this repo. |
| 20 | + |
| 21 | + $ git clone https://github.com/bleech/flynt-docs.git |
| 22 | + |
| 23 | +2. Download Hugo from [http://gohugo.io](http://gohugo.io) or install using Homebrew: |
| 24 | + |
| 25 | + $ brew update && brew install hugo |
| 26 | + |
| 27 | +3. Install npm packages using [yarn](https://yarnpkg.com/) (make sure yarn is installed on your system). |
| 28 | + |
| 29 | + $ yarn |
| 30 | + |
| 31 | +4. Start the default gulp task to build and watch styles, scripts and assets. The site is served under `localhost:1313`. |
| 32 | + |
| 33 | + $ gulp |
| 34 | + |
| 35 | +5. Add content under the `content/` tree. |
| 36 | + |
| 37 | +## Usage |
| 38 | + |
| 39 | +### Adding menu items |
| 40 | +#### Top menu item |
| 41 | +1. Go to the `config.toml` file |
| 42 | +2. Go to the `# Top Menu Items` comment |
| 43 | +3. Add a top menu item like this: |
| 44 | + |
| 45 | +``` |
| 46 | +[[menu.main]] |
| 47 | + name = "Top menu name" |
| 48 | + url = "/top/menu/subpage/" |
| 49 | + identifier = "unique-identifier" |
| 50 | + weight = 10 |
| 51 | +``` |
| 52 | +|Attribute |Type |Details | |
| 53 | +|-----------|-------|-------------------------------------------------- | |
| 54 | +|name |string |Name that will show up in the top menu. | |
| 55 | +|url |string |Explicit url to wich the page should point to. | |
| 56 | +|identifier |string |Should be **unique** for every item! | |
| 57 | +|weight |int |For the order of menu items, lower is more on top | |
| 58 | + |
| 59 | +#### Side Menu item |
| 60 | +1. Go to the `config.toml` file |
| 61 | +2. Go to the `# Side Menu Items` comment |
| 62 | +3. Add a side menu item like this: |
| 63 | + |
| 64 | +``` |
| 65 | +[[menu.main]] |
| 66 | + name = "Side menu name" |
| 67 | + url = "/side/menu/subpage/" |
| 68 | + parent = "parent-identifier" |
| 69 | + identifier = "unique-sub-identifier" |
| 70 | + weight = 10 |
| 71 | +``` |
| 72 | +|Attribute |Type |Details | |
| 73 | +|-----------|-------|-------------------------------------------------- | |
| 74 | +|name |string |Name that will show up in the side menu. | |
| 75 | +|parent |string |Identifier of the top menu item under wich this page resides| |
| 76 | +|url |string |Explicit url to wich the page should point to. | |
| 77 | +|identifier |string |Should be **unique** for every item! | |
| 78 | +|weight |int |For the order of menu items, lower is more on top | |
| 79 | + |
| 80 | +#### Side submenu item |
| 81 | +1. Go to the page that should be added to the side menu in the `Content` folder. |
| 82 | +2. At the top of the page add this to the parameter: |
| 83 | +``` |
| 84 | +menu: |
| 85 | + main: |
| 86 | + name: "Side menu name" |
| 87 | + parent: "unique-sub-identifier" |
| 88 | + weight: 20 |
| 89 | +``` |
| 90 | +|Attribute |Type |Details | |
| 91 | +|-----------|-------|-------------------------------------------------- | |
| 92 | +|name |string |Name that will show up in the sub menu. | |
| 93 | +|parent |string |Identifier of the side menu item under wich this page resides| |
| 94 | +|weight |int |For the order of menu items, lower is more on top | |
| 95 | + |
| 96 | +### Versioning |
| 97 | +1. Go to the pages where you want subversioning on. |
| 98 | +``` |
| 99 | +-api |
| 100 | +--test1.md |
| 101 | +--test2.md |
| 102 | +``` |
| 103 | +2. Create subfolders for every version, and put copies of the files in them. **Every version subfolder should start with the letter v and an integer (v1.0.0, v23.43.bla)** |
| 104 | +``` |
| 105 | +-api |
| 106 | +--v1.0.0 |
| 107 | +---test1.md |
| 108 | +---test2.md |
| 109 | +--v2.0.0 |
| 110 | +---test1.md |
| 111 | +---test2.md |
| 112 | +``` |
| 113 | + |
| 114 | +3. Add them to the sidemenu like you would do with a normal file. **Don't forget to give every page a unique id and different weight. Weight will determain position in the dropdown menu** |
| 115 | + |
| 116 | + |
| 117 | +##### Example: |
| 118 | +**api/v1.0.0/test1.md** |
| 119 | +``` |
| 120 | +menu: |
| 121 | + main: |
| 122 | + name: "Test01" |
| 123 | + parent: "unique-sub-identifier" |
| 124 | + identifier: 'test01-v1' #Different from v2.0.0 |
| 125 | + weight: 20 #Different from v2.0.0 |
| 126 | +``` |
| 127 | +**api/v2.0.0/test1/md** |
| 128 | +``` |
| 129 | +menu: |
| 130 | + main: |
| 131 | + name: "Test02" |
| 132 | + parent: "unique-sub-identifier" |
| 133 | + identifier: 'test01-v2' #Different from v1.0.0 |
| 134 | + weight: 30 #Different from v1.0.0 |
| 135 | +``` |
| 136 | + |
| 137 | +### Adding Redirects for old content |
| 138 | + |
| 139 | +This is done by adding the old URL (the one you want to redirect) as an alias to the new destination page. |
| 140 | + |
| 141 | +##### Example: |
| 142 | +``` |
| 143 | +date: 2016-09-13T09:00:00+00:00 |
| 144 | +title: Artifacts |
| 145 | +menu: |
| 146 | + main: |
| 147 | + parent: "Using Flynt" |
| 148 | + weight: 10 |
| 149 | +aliases: |
| 150 | + - /using-flynt/ |
| 151 | +``` |
| 152 | + |
| 153 | +## Maintainers |
| 154 | + |
| 155 | +This project is maintained by [bleech](https://github.com/bleech). |
| 156 | + |
| 157 | +The main people in charge of this repo are: |
| 158 | + |
| 159 | +- [Dominik Tränklein](https://github.com/domtra) |
| 160 | +- [Doğa Gürdal](https://github.com/Qakulukiam) |
| 161 | +- [Michael Carruthers](https://github.com/emcarru) |
| 162 | + |
| 163 | +## Contribute |
| 164 | + |
| 165 | +To contribute, please use github [issues](https://github.com/flyntwp/flynt-docs/issues). Pull requests are accepted. |
| 166 | + |
| 167 | +If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. |
| 168 | + |
| 169 | +## License |
| 170 | + |
| 171 | +MIT © [bleech](https://www.bleech.de) |
0 commit comments