GithubHelp home page GithubHelp logo

wxwidgets / website Goto Github PK

View Code? Open in Web Editor NEW
19.0 11.0 32.0 20.94 MB

Source code for the official wxWidgets website.

Home Page: https://www.wxwidgets.org/

JavaScript 29.98% Shell 4.61% HTML 43.66% Perl 2.23% Ruby 7.18% SCSS 12.35%

website's Introduction

wxWidgets Website

The wxWidgets website is built using Jekyll, using Node.js to compile all static assets including the Bootstrap library the site is built on using Sass stylesheets. Most of the content on the website is written using Markdown, making it extremely easy to write and maintain. Icons are provided by Font Awesome.

Quick-start Guide

We've prepared a Vagrant configuration that can automatically install and configure all dependencies listed above. So it's a bit more to download, but is the quickest and most reliable way to dive right in if you aren't already familiar with Jekyll or Node.js. Simply download and install both VirtualBox and Vagrant, and run the following from a command prompt in this checkout:

$ vagrant up

This will take 15 to 20 minutes to complete the first time. After your Vagrant box is up and running, you can SSH in by running:

$ vagrant ssh

This checkout will be shared with this virtual machine at /vagrant, so you can go there now and run yarn dist to compile all assets, and run jekyll to start up the built-in webserver that will process all files on startup. This will need to be restarted to process any changes.

$ cd /vagrant
$ yarn --no-bin-links
$ yarn dist
$ bundle
$ bundle exec jekyll serve --host 0.0.0.0

Note that you only need to run yarn dist once per new checkout. Now you can edit content at verify your changes by pulling up the website running inside of your Vagrant box (after restarting Jekyll): http://localhost:4000/

Jekyll can automatically watch for changes, however, it's not able to when running within VirtualBox since filesystem notifications don't work over a shared folder. If you find yourself working on changes that require frequent rebuilds, you should consider installing all dependencies locally so you can run Jekyll with automatic rebuilds:

$ bundle exec jekyll serve --watch

Minimal Setup for Content Editing Only

If you only want to modify some page contents and are not going to touch any CSS or JavaScript code, you can avoid installing Node.js and NPM packages with Yarn since it is only really needed to produce the minified CSS and JavaScript files which can be retrieved from the main site:

$ curl https://www.wxwidgets.org/assets/css/global.min.css > assets/css/global.min.css
$ curl https://www.wxwidgets.org/assets/js/global.min.js > assets/js/global.min.js

Then you only have to install Jekyll and run it in order to preview your changes locally before pushing them out.

Posting News or Blog Posts

Jekyll has a helpful guide on writing posts that outlines almost exactly how we manage our News posts here. Our News posts are managed using this system, but note that we don't use categories or tags on News (we do use tags on blog posts though). Our Developer Blog posts are very similar, except they are located in the _blog directory.

To create a fresh News post, you can run:

./new_post Some Exciting News Title

This will create the post file, and fill in all necessary YAML front matter. Then simply write your post in Markdown after the --- marker.

By default, the script will enable comments on your post. If this isn't desired, find comments in the YAML front matter, and change it from true to false.

Also by default, new posts will be promoted on the home page. If this isn't desired, add promoted: false in the YAML front matter.

For the blog posts, just use ./new_blog instead of new_post, otherwise the behaviour is exactly the same.

Tips and Conventions used in Markdown

Note that on top of standard Markdown, this site supports much of the additional features provided by GFM (GitHub Flavored Markdown).

The following GFM features are supported:

  • Syntax Highlighting
  • Tables
  • Automatic linking for URLs
  • Strikethrough

The use of Jekyll means that pages don't need to be entirely just Markdown. All content can use Liquid templates to generate HTML markup using settings or data provided in YAML front matter. It's also possible to mix both Markdown and HTML in the same file (just leave a blank line between them), just in case you can't accomplish what you want with Markdown. This should be rare in news or blog posts, but a little more common in official site content.

If you add images, scripts, or other files referenced in your content, it's best to add it close to the content your adding it to. For example, all screenshots shown on the Screenshots page are located here:

about/screenshots/

This applies to news and blog posts as well, but is a bit more confusing since the post will be in either _posts or _blog, but their files need to be under their final post destination path: news and blog. For example, this post:

_blog/2009-07-05-june-news.md

has a screenshot under:

blog/2009/07/june-news/button_gtk.png

which can be referenced in HTML like so:

<img src="button_gtk.png">

or in Markdown like this:

![GTK Button](button_gtk.png)

If you use a parent path instead, it may be easier to specify an absolute path to that file in your content. This should be done if you reference the same files from multiple pages or posts.

website's People

Contributors

aaronraimist avatar afalkenhahn avatar ardovm avatar bartoszwarzocha avatar catalinr avatar csomor avatar dependabot[bot] avatar dghart avatar doscott avatar ericje avatar iwbnwif avatar jogendra avatar juliansmart avatar lanurmi avatar mcorino avatar mfikes avatar mikeairey avatar milotype avatar mtangoo avatar pbfordev avatar perazz avatar redtide avatar reingart avatar tct2k avatar theoveenker avatar tierra avatar utelle avatar vadz avatar wolf-so avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Run failed: Publish Website - master (619621c)

I recieved an email with this title yesterday at 7:25pm GMT-4. The body is shown below. This is from my cloned repository. I have done anything with this site other than keeping it up to date.

Run failed for master (619621c)

Repository: doscott/website
Workflow: Publish Website
Duration: 2 minutes and 18.0 seconds
Finished: 2020-05-07 22:25:15 UTC

View results
Jobs:

publish failed (1 annotation)

It appears this workflow task is being repeated periodically on my cloned repository, and other than this occurrence (which reported Unexpected HTTP response: 403) has been successful.

I am just raising the issue in case this is not normal.

Warn when viewing outdated docs

When googling for wxWidgets class to see its docs, usually the top result is for v3.0 or something, i.e., severally outdated.

I know nothing about webservers but I wonder if there is not some easily done and not performance taxing magic (htaccess etc.) that could inject a warning to html docs that are not for the master or the stable version, i.e., something like boost or CMake docs do.

Screenshots in blog post Great Grid Updates are not displayed

Screenshots in blog post Great Grid Upgrades added in cf6b6fd are not displayed: https://wxwidgets.org/blog/2024/06/great-grid-upgrades/

The images links are insanely long github URLs, probably copied from the code PRs: Either they are invalid in the blog post (they do not work when used as an address in a browser) or too long to be handled properly by the blog system.

Perhaps it would be better to upload the images along the blog text at wxWidgets website, as it was done e.g. in e34ef07.

@AliKet already commented this on the blog entry itself, but perhaps it was missed.

BTW, I believe it would be for the best if new blog posts were announced in wx-dev and/or wx-users: It is very easy to miss them, as they do not appear on the wxWidgets homepage either. Both groups are rather low-traffic and new blog posts are rare...

cannot start jekyll in vagrant

Hi

sorry, I'm really not fluent in vagrant, and just trying to create a simple PR for the website :-) but I stumble over

vagrant@ubuntu-bionic:/vagrant$ jekyll serve --host 0.0.0.0
Traceback (most recent call last):
	5: from /usr/local/bin/jekyll:23:in `<main>'
	4: from /usr/local/bin/jekyll:23:in `load'
	3: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/exe/jekyll:11:in `<top (required)>'
	2: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
	1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- bundler (LoadError)

having

vagrant@ubuntu-bionic:/vagrant$ ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

Any pointers are very appreciated. Thanks

bootstrap4 presentation

I just went through the process for using the new branch. All went well. The following error's were reported:

vagrant@ubuntu-xenial:/vagrant$ yarn dist
yarn run v1.5.1
$ node node_modules/npm-run-all/bin/run-p/index.js css js
$ node node_modules/npm-run-all/bin/run-s/index.js js-minify
$ node node_modules/npm-run-all/bin/run-s/index.js css-compile css-prefix css-minify
$ node_modules/node-sass/bin/node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 _assets/scss/global.scss assets/css/global.css
$ node_modules/uglify-js/bin/uglifyjs --compress --mangle --comments "/^!/" --source-map "includeSources,url=global.min.js.map" --output assets/js/global.min.js node_modules/jquery/dist/jquery.min.js node_modules/bootstrap/dist/js/bootstrap.bundle.min.js "node_modules/@fancyapps/fancybox/dist/jquery.fancybox.min.js" _assets/js/*.js
sh: 1: node_modules/uglify-js/bin/uglifyjs: Permission denied
error An unexpected error occurred: "Command failed.
Exit code: 126
Command: sh
Arguments: -c node_modules/uglify-js/bin/uglifyjs --compress --mangle --comments \"/^!/\" --source-map \"includeSources,url=global.min.js.map\" --output assets/js/global.min.js node_modules/jquery/dist/jquery.min.js node_modules/bootstrap/dist/js/bootstrap.bundle.min.js \"node_modules/@fancyapps/fancybox/dist/jquery.fancybox.min.js\" _assets/js/*.js
Directory: /vagrant
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/vagrant/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "js-minify" exited with 1.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c node node_modules/npm-run-all/bin/run-s/index.js js-minify
Directory: /vagrant
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/vagrant/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Command failed.
Exit signal: SIGTERM
Command: sh
Arguments: -c node node_modules/npm-run-all/bin/run-s/index.js css-compile css-prefix css-minify
Directory: /vagrant
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/vagrant/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "js" exited with 1.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c node node_modules/npm-run-all/bin/run-p/index.js css js
Directory: /vagrant
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/vagrant/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

A link to a dropbox screen shot:
https://www.dropbox.com/s/chf59kp9di16uvb/Screenshot_20180325_092320.png?dl=0

This is on a 1920x1080 monitor, latest Firefox on Tumbleweed. The title bar isn't quite right. The Quick Links area is quite different than the current in terms of looks. The layout of the main area is different as well.

It may be that things are still in a state of flux. Nothing here meant as criticism, just some feedback.

Dead link (anchor #twostep_ctor) within Coding Guidelines

The last sentence in the section Don't use exceptions seems to refer to details on the subject of two-step construction:

The special case of constructors, which have no return value, is typically handled by providing an IsOk() method indicating whether the object was constructed successfully and, for all wxWindow-derived classes, also by using two-step construction.

But there is no section about it on this page. (At least none that I've been able to find so far).

Publish workflow got broken

For some reason publish workflow doesn't run any more, see e.g. this run. The weird thing is that this error appeared ~12 hours ago for the first time, but there was one successful run since then, while all the other have failed.

AFAICS the error happens because something (what?) requires C++14 compiler now (std::remove_cv_t is C++14 only), but we must not be using one. The simplest fix would be pin this something, whatever it is, to an earlier version. Alternatively we can try running the workflow on Ubuntu 20.04.

@tierra Any hints would be welcome, I've never used yarn in my life so I have no idea what it does nor how to tell it to use an older version of node-sass (?). TIA!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.