As all source{d} projects, this project follows the source{d} Contributing Guidelines.
In addition to the source{d} Contributing Guidelines, this project follows the guidelines described below.
The landing contains 2 parts:
- The static site itself: a webpack app,
- a Go API to serve the latest blog posts and job offers.
In production, each part lives in a separated container.
The static site is built with:
- webpack:
javascript
(with someREACT
components) andcss
(fromSASS
stylesheets) - hugo: for the
HTML
fromGo
templates andYAML
data
Its source code is under:
hugo
directory: forhugo
sources:content
directory: contains one.md
per landing page that defines each page metadata,data
directory: contains the landing variable content like titles, captions, descriptions, projects...layout
directory: contains theHTML
templates.
src
directory: forjs
andsass
code,static/img
directory: for site images,
There are some external applications loading resources from http://sourced.tech/ so they should be preserved between different landing versions or considered as cross-project issues.
https://sourced.tech/css/bundle.css
https://sourced.tech/js/bundle.js
https://sourced.tech/img/home_separator_3.png
https://sourced.tech/img/logo_footer.svg
https://sourced.tech/img/logos/favicon.png
https://sourced.tech/engine
https://sourced.tech/lookout
https://sourced.tech/open-source
https://sourced.tech/community
https://sourced.tech/company
The API serves (a cached version of):
- the 3 latest blog posts tagged as
technical
, and the 3 latest blog posts tagged asculture
for the home page, - all the opened positions at Lever,
Its source code is under api
directory.
You should already have Go installed, and properly configured the $GOPATH
go version; # prints your go version
go env GOPATH; # prints your $GOPATH path
The project must be under the $GOPATH
, following the Go import conventions, what means you can install and cd to its directory running:
go get github.com/src-d/landing/...
cd $GOPATH/src/github.com/src-d/landing
You also need Yarn v1 installed
yarn --version; # prints your Yarn version
You need to satisfy all project requirements, and then to run:
make build
You need to satisfy all project requirements, and then to run:
LANDING_URL=//localhost PORT=8081 make serve
It runs everything you need to get the site working at http://localhost:8081
Alternatively, you can start hugo, the api-server and webpack in a "three window mode", just running:
make project-dependencies
LANDING_URL=//localhost PORT=8081 yarn start
With this command, each window runs a command, that can be also ran by you in case you need to control the output of each command or in any other special case:
yarn run webpack-watcher
To start webpack watcher, that will rebuild the assets when you change its sourcesmake hugo-server
To serve the landing locally using hugo serveryarn run api-run
To start the landing API at http://localhost:8080
Since the Landing repository is used as a blueprint for every documentation site as served by src-d/docs, the Landing can be used to generate a "documentation like" site; To do so, it is needed to run:
make develop-documentation
And then, go to http://localhost:8081
To rollback the changes, and see the landing as usual, just run:
make develop-documentation-destroy
The following envars are available for API configuration
envar | default *
- | -
ADDR
|:8080
FEED_BASE_URL
|http://blog.sourced.tech/json/
POSITIONS_BASE_URL
|https://api.lever.co/v0/postings/sourced?mode=json
* The default values are defined by api/config/config.go