Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website update prep #5586

Merged
merged 14 commits into from
Jul 7, 2023
Merged
20 changes: 13 additions & 7 deletions www/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ if ! [ -v GITHUB_TOKEN_READ_ONLY ]; then
echo 'Building tutorial.html from tutorial.md...'
mkdir www/build/tutorial

cargo run --release --bin roc run www/generate_tutorial/src/tutorial.roc -- www/generate_tutorial/src/input/ www/build/tutorial/
cargo build --release --bin roc
roc=target/release/roc
else
echo 'Fetching latest roc nightly...'

Expand All @@ -81,17 +82,22 @@ else
ls | grep "roc_nightly.*tar.gz" | xargs rm
# simplify dir name
mv roc_nightly* roc_nightly
roc='./roc_nightly/roc'

echo 'Building tutorial.html from tutorial.md...'
mkdir www/build/tutorial

./roc_nightly/roc version
./roc_nightly/roc run www/generate_tutorial/src/tutorial.roc -- www/generate_tutorial/src/input/ www/build/tutorial/

# cleanup
rm -rf roc_nightly roc_releases.json
fi

$roc version
$roc run www/generate_tutorial/src/tutorial.roc -- www/generate_tutorial/src/input/ www/build/tutorial/
mv www/build/tutorial/tutorial.html www/build/tutorial/index.html

# for new wip site
mkdir www/build/wip
roc run www/wip_new_website/main.roc -- www/wip_new_website/content/ www/build/wip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukewilliamboswell, I moved the build steps to this script, I really wanted to use arguments with the roc build script but couldn't due to roc-lang/basic-cli#82

cp -r www/wip_new_website/static/site.css www/build/wip

# cleanup
rm -rf roc_nightly roc_releases.json

popd
3 changes: 3 additions & 0 deletions www/wip_new_website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
roc-website
dist/
website-builder
46 changes: 46 additions & 0 deletions www/wip_new_website/build.roc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env roc
app "website-builder"
packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.4.0-rc1/hbIodFf7kULTYZJkzgsvgsnFAvQexm5hVeBaOMZk84I.tar.br" }
imports [
pf.Task.{ Task },
pf.Command,
pf.Arg
]
provides [main] to pf

main =
# TODO take dist folder name and main.roc path as args once https://github.com/roc-lang/basic-cli/issues/82 is fixed
# TODO add function to remove boilerplate
# Remove dist folder
{} <-
Command.new "rm"
|> Command.args ["-rf", "dist/"]
|> Command.status
|> Task.onErr \_ -> crash "Failed to remove dist folder"
|> Task.await

# Build site
{} <-
Command.new "roc"
|> Command.args ["run", "main.roc", "--", "content/", "dist/"]
|> Command.status
|> Task.onErr \_ -> crash "Failed to build site"
|> Task.await

# Copy static files
{} <-
Command.new "cp"
|> Command.args ["-r", "static/site.css", "dist/"]
|> Command.status
|> Task.onErr \_ -> crash "Failed to copy static files"
|> Task.await

# Start file server
{} <-
Command.new "simple-http-server"
|> Command.args ["-p", "8080", "--", "dist/"]
|> Command.status
|> Task.onErr \_ -> crash "Failed to run file server; consider intalling with `cargo install simple-http-server`"
|> Task.await

Task.ok {}
39 changes: 39 additions & 0 deletions www/wip_new_website/content/community.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contribute to Roc

## Community Values

<!--
Work in Progress - Richard is developing this section

Basically it will say something like we expect you to be kind, even if you think someone is being mean to you, don't assume ill intentions etc
-->

## Meet the Community

- Group Chat [roc.zulipchat.com](https://roc.zulipchat.com/)
- Github Project [roc-lang/roc](https://github.com/roc-lang/roc)
- Meetups & Events

## Ideas & Proposals

- [Good First Issues](https://github.com/roc-lang/roc/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)

<!--
In this section we want to explain the process, i.e. it's less formal

TODO finish editing this section
-->

Roc doesn't have a formal process for managing design proposals. The guiding principal for now is that as a community we should all be friendly, supportive, and openly discuss and sharing ideas.

There are three loose stages that a design proposal can go through in Roc: Idea, Proposal, and Implementation.

In the Idea stage, people are encouraged to describe their idea and explore the problem, potential solutions, and trade-offs. It is helpful to share the idea in the group chat using the #ideas channel.

If there is a general consensus that an idea is promising and worth developing, people are encouraged to develop a design Proposal. Some ideas are simple and should progress straight to implementation. However, for more complex Proposals a it write the design into an article or blog post and share it online. This documentation helps in clarifying the proposal and making it more accessible to the community.

Implementation using PR...

## Code of Conduct

<!-- link to github goes here -->
Loading