Giter VIP home page Giter VIP logo

fastn-old's People

Contributors

abrarnitk avatar akasahi avatar allcontributors[bot] avatar amitu avatar arcoprova avatar arpita-jaiswal avatar aviralverma13 avatar dependabot[bot] avatar fossabot avatar gsalunke avatar heulitig avatar priyanka9634 avatar sharmashobhit avatar sourabh-garg avatar wasif1024 avatar wilderbitnet avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fastn-old's Issues

add color codes in fpm library

/-- light-mode-palete:
-- string l-bg-1: #FFFFFF
-- string l-bg-2: #E5E5E5
-- string l-bg-3: #F6F6F6
-- string l-bg-4: #8E8E8E
-- string l-bg-5: #ACABAB
-- string l-bg-6: #CDCECE
-- string l-text-1: #000000
-- string l-text-2: #E7E7E7
-- string l-text-3: #686868
-- string l-text-4: #0B7FEA
-- string l-text-5: #7B7B7B
-- string l-text-6: #8A8A8A


/-- dark-mode-palete:
-- string d-bg-1: $l-text-1
-- string d-bg-2: $l-text-2
-- string d-bg-3: $l-text-3
-- string d-bg-4: $l-text-4
-- string d-bg-5: $l-text-5
-- string d-bg-6: $l-text-6
-- string d-text-1: $l-bg-1
-- string d-text-2: $l-bg-2
-- string d-text-3: $l-bg-3
-- string d-text-4: $l-bg-4
-- string d-text-5: $l-bg-5
-- string d-text-6: $l-bg-6

optimization: use dependency graph to only build a document when needed

We can possibly optimise fpm build by doing this. Once #62 is implemented we will have a dependency graph.

We will also store another file, .build-workspace/hashes.ftd which will store hash of every file during fpm build:

-- document: filename.ftd
hash: <sha256 hash of filename.ftd>

In order for this to work reliably (so changes on file system why fpm build is working do not mess our hashing and dependency) we will first do an in-memory read of all ftd files, and compute the current hash.

When processing any file, in fpm::commands::build::process_ftd() we will use content of hashes.ftd and deps.ftd file to see if the hash of ftd file or any of it's dependencies has changed since last run. If not we would skip this file.

What about missing or modified html files?

To be sure we do proper rebuild, we will also store the hash of generated HTML file, and if the HTML file is missing of hash does not match, we will rebuild the ftd file.

ftd.dev is not building

After fastn-stack/ftd.dev@b16c378 I am getting panic when trying to do fpm build --base=/:

amitu@Apples-MacBook-Pro-2 ftd.dev % fpm build --base=/ 
thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 4', /Users/amitu/.cargo/git/checkouts/ftd-1d08df4728f7983b/68c0f9d/src/p2/interpreter.rs:452:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

if package a imports b from same package there are issues with auto import

Getting the following error:

Error: PackageError { message: "failed to parse ParseError { message: \"ftd.dev/examples/diagram#config is not present in doc, Err(ParseError { message: \\\"ftd.dev/examples/diagram: not found (\\\\\\\"ftd.dev/examples/diagram#config\\\\\\\"), f: get_thing\\\", doc_id: \\\"ftd.dev/examples/diagram\\\", line_number: 1 })\", doc_id: \"ftd.dev/examples/diagram\", line_number: 1 }" }

rename `/FPM/` urls to `/-/`

We used ~ in FifthTry.com as separator but ~ is not allowed in filenames with Github Pages. I think /-/ looks better than /FPM/ etc.

fpm build fails for translation package

Trying to build this repo.
Getting the following error

Error: PackageError { message: "failed to parse ParseError { message: \"library not found: arpita-jaiswal.github.io/vivekanand/config\", doc_id: \"\", line_number: 0 }" }

store dependency graph during `fpm build`

We want to store dependency tree of every ftd module in a package in .build-workspace folder.

fpm build command will create .build-workspace/deps.ftd file:

-- deps: name/of/file.ftd
depends-on: some-file.ftd
depends-on: some-other-file.ftd

The type of deps is going to be:

-- record deps:
caption name:
string list depends-on:

Implementation Detail

In fpm::Library we will add dependencies, vector containing all files that were loaded, and we will modify fpm::Library.get() method and on every call to .get() we will store the name argument to fpm::LIbrary.dependencies.

We will also add a method: write_depds() in fpm::Library. fpm::Library's document_id will be the deps.name and .dependencies will be written as depends-on.

toc-v2 not working

while using below spnipet:

-- ft.header-toc:
$processor$: toc-v2

- Quickstart: quickstart/
- Use this template
  url: https://github.com/FifthTry/Blue-Sapphire-Template/generate/

I see below error:

thread 'main' panicked at 'not yet implemented', src\library\new_toc.rs:291:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

when using canonical urls, special pages should not include canonical tag

Since our spacial pages would not exist in original project, eg /-/translation-status/ is fpm feature and does not exist in canonical (non fpm) location (we are assuming people will only use canonical when they are importing their content to FPM only for translation purpose), the special URLs on canonical host will 404.

/-/* pages should not include <link rel="canonical"> tag.

fpm build fails to download packages on windows

on Windows fpm build is not fetching packages. We need to manually download all packages.

Error: IoError(Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." })

Can we have a list of missing packages it's looking for?

allow `foo/index.ftd` as a substitute for `foo.ftd`

When creating a section, sometime I want to create a folder, and put everything related to that section in that folder. Currently its organised as <section-name>.ftd and <section-name>/intro.ftd and so on. I prefer if everything related to section can be kept in a folder.

What if both foo.ftd and foo/index.ftd exist?

Easiest thing would be to be strict and error out. For now let's go with this and wait for issues say this is a bad idea.

static files from themes to be included in .build

foo.com/x/y.png would be stored in .build/-/foo.com/x/y.png, for all static files (current package and dependencies). When referring to status URLs, eg image etc, always use -/foo.com/x/y.png etc path.

fpm status failing

In ftd.dev repo right now fpm status is not working.

Error: IoError(Error { kind: InvalidData, message: "stream did not contain valid UTF-8" })

allow dependency override

Say I have a dependency on Forest-Theme, which itself depends on fifthtry.github.io/header. Now say I created my own mycompany.com/header which implements fifthtry.github.io/header and I want Forest-Theme to use my header instead of the FifthTry header, I should be able to do this:

-- fpm.dependency: fifthtry.github.io/Forest-Theme as ft
override: mycompany.com/header as fifthtry.github.io/header

override can be called once or more. Also it works recursively, eg if ft does not directly use a dependency but is used transitively.

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.