Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

Commit c531485

Browse files
author
Doğa Gürdal
authored
feat(Hugo): switch to hugo (#13)
* build(hugo): switch to hugo setup and make it work * chore(ignored folders): add empty archetypes and data folders hugo folders that might be needed later * feat(hugo-vamp): implement vamp theme and adjust content files to work with it * refactor(static assets): move static assets to src directory and adjust gulpfile.js to accomodate also removed some unused files * build(gulp): correct styles order and add minification * chore(static): remove dist files * chore(static): remove more dist files * chore(static): adjust gitignore for removed static folder * build(gulp): copy js vendor files without concatenating since we have http2 this should be preferred * chore(src/scripts): remove unused scripts * build(gulp): load all js files in src dir and uglify them * build(gulp): add watch task and split gulp tasks into meaningful names * build(gulp): split tasks into separate files, use gulpfile.js folder instead of file, remove unused * chore(base-url): remove base-url file and gitignore it this file is generated by the gulp task and changes when using a different environmen (e.g. gulp vs. gulp build) * chore(themes): remove unused theme and themes folder * build(gulp): convert all styles to sass * fix(config): correct baseUrl to make redirects work locally * docs(readme): add copy of vamp repo readme * docs(readme): make readme standard compliant * docs(readme): add gulp step to install instructions * feat(layouts/index.html): redirect start page to first main menu url removed old custom start page * perf(config): remove redirect on menu links by adding the complete url to main menu items also moved tutorial to its own separate folder * refactor(images): remove unused vamp images missing menu item icon now, but that should be changed anyways * build(gulp): add missing array for watch task * chore(static): add static folder to prevent error on first gulp run buildSearchIndex throws an error if the folder doesn't exist yet * chore(static): actually add the .gitkeep file... * docs(README.md): Add step to run npm install * docs(readme): adjust installation instructions use yarn, add periods to the end of sentences * build(gulp): watch all sass files instead of just main files * fix(config.toml): social twitter param defined correctly * feat(layouts, styles): add flynt logo and brand colours * fix(config.toml): add correct favicon url * feat(styles): use more flynt grey/greens rather than vamp blues * feat(styles): adjust base colors to greys from grey-blues * fix(baseStyles): fix up any broken base styling, update highlight.js * fix(components): remove un-needed styling, fix more base styles that we brought over * fix(styles): update mobile menu styles * build(gulp): add browsersync, add hugo to the gulp process instead of using hugo server as an additional simultaneous process, now this all happens in a single process * build(docker): add Dockerfile build and run production version with this * chore(Icon files): remove from repo and gitignore them * docs(readme): correct instructions for browsersync setup * fix(config): use localhost:1313 as dev base url * build(gulp): browser sync watch static folder only
1 parent 83f690f commit c531485

File tree

194 files changed

+12688
-807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+12688
-807
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

.gitignore

+45-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,46 @@
1-
_book
1+
*.css.map
2+
static
3+
!static/.gitkeep
4+
.idea
5+
public
26
node_modules
3-
npm-debug.log
4-
docs/styles/**/*.css.map
7+
layouts/partials/base-url.html
8+
9+
# Compiled source #
10+
###################
11+
*.com
12+
*.class
13+
*.dll
14+
*.exe
15+
*.o
16+
*.so
17+
18+
# Packages #
19+
############
20+
# it's better to unpack these files and commit the raw source
21+
# git has its own built in compression methods
22+
*.7z
23+
*.dmg
24+
*.gz
25+
*.iso
26+
*.jar
27+
*.rar
28+
*.tar
29+
*.zip
30+
31+
# Logs and databases #
32+
######################
33+
*.log
34+
*.sql
35+
*.sqlite
36+
37+
# OS generated files #
38+
######################
39+
.DS_Store
40+
.DS_Store?
41+
._*
42+
.Spotlight-V100
43+
.Trashes
44+
ehthumbs.db
45+
Thumbs.db
46+
Icon

Dockerfile

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
FROM ubuntu:16.04
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
5+
RUN apt-get update \
6+
&& apt-get install -y --no-install-recommends \
7+
curl \
8+
ca-certificates \
9+
git \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
13+
&& apt-get update \
14+
&& apt-get install -y --no-install-recommends nodejs \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
18+
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
19+
&& apt-get update \
20+
&& apt-get install -y --no-install-recommends yarn \
21+
&& rm -rf /var/lib/apt/lists/*
22+
23+
RUN apt-get -qq update \
24+
&& apt-get -qq install -y --no-install-recommends python-pygments \
25+
software-properties-common \
26+
python-software-properties \
27+
&& rm -rf /var/lib/apt/lists/*
28+
29+
RUN add-apt-repository ppa:longsleep/golang-backports \
30+
&& apt-get update \
31+
&& apt-get install -y --no-install-recommends golang-go \
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
ENV GOPATH /go
35+
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
36+
37+
RUN apt-get update \
38+
&& apt-get install -y --no-install-recommends build-essential \
39+
&& rm -rf /var/lib/apt/lists/*
40+
41+
RUN go get -u github.com/kardianos/govendor \
42+
&& govendor get github.com/spf13/hugo
43+
44+
RUN cd /go/src/github.com/spf13/hugo \
45+
&& make install
46+
47+
RUN mkdir /usr/share/src
48+
WORKDIR /usr/share/src
49+
50+
# Expose default hugo port
51+
EXPOSE 1313
52+
53+
# By default, serve site
54+
CMD yarn && yarn run build && yarn run buildIndex

README.md

+166-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,171 @@
1-
# What is Flynt?
1+
# flynt-documentation
2+
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
23

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).
45
6+
## Table of Contents
57

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)
816

9-
## Ecosystem
10-
<!-- TODO: Write this section. -->
17+
## Install
1118

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)

archetypes/.gitkeep

Whitespace-only changes.

assets/github.svg

-1
This file was deleted.

book.json

-32
This file was deleted.

cli/commands.md

-3
This file was deleted.

components/fields/README.md

-9
This file was deleted.

components/fields/flexible-content.md

-21
This file was deleted.

components/fields/options-page.md

-7
This file was deleted.

0 commit comments

Comments
 (0)